640 lines
25 KiB
Plaintext
640 lines
25 KiB
Plaintext
|
global proc VertexColorToNormalCommand(int $num)
|
|||
|
{
|
|||
|
if($num == 1)
|
|||
|
{
|
|||
|
string $colorSetsMenuItems[] = `optionMenu -q -ill VertexColorToNormalCurrentColorSet_optionMenu1`;
|
|||
|
if(size($colorSetsMenuItems))
|
|||
|
{
|
|||
|
deleteUI $colorSetsMenuItems;
|
|||
|
}
|
|||
|
|
|||
|
string $allColorSets[] = `polyColorSet -q -acs`;
|
|||
|
if(size($allColorSets)>0)
|
|||
|
{
|
|||
|
for($name in $allColorSets)
|
|||
|
{
|
|||
|
menuItem -label $name -p VertexColorToNormalCurrentColorSet_optionMenu1 ;
|
|||
|
}
|
|||
|
}
|
|||
|
string $CurrentColorSets[] = `polyColorSet -q -ccs`;
|
|||
|
if(size($CurrentColorSets))
|
|||
|
{
|
|||
|
optionMenu -e -v $CurrentColorSets[0] VertexColorToNormalCurrentColorSet_optionMenu1;
|
|||
|
}
|
|||
|
}
|
|||
|
if($num == 2)
|
|||
|
{
|
|||
|
string $setName = `textField -q -tx VertexColorToNormalCreateColorSet_textField1`;
|
|||
|
if(size($setName))
|
|||
|
{
|
|||
|
polyColorSet -cr -cla 0 -rpt RGBA -cs $setName;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
polyColorSet -cr -cla 0 -rpt RGBA -cs "colorSet" ;
|
|||
|
}
|
|||
|
VertexColorToNormalCommand 1;
|
|||
|
}
|
|||
|
if($num == 3)
|
|||
|
{
|
|||
|
string $currentVtxColorSet = `optionMenu -q -v VertexColorToNormalCurrentColorSet_optionMenu1`;
|
|||
|
if(size($currentVtxColorSet))
|
|||
|
{
|
|||
|
polyColorSet -delete -colorSet $currentVtxColorSet;
|
|||
|
VertexColorToNormalCommand 1;
|
|||
|
}
|
|||
|
}
|
|||
|
if($num == 4)
|
|||
|
{
|
|||
|
if(size(`ls -sl`))
|
|||
|
{
|
|||
|
PolySelectConvert 3;
|
|||
|
}
|
|||
|
string $selVtx[] = `ls -sl -fl`;
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($selVtx));
|
|||
|
//for($name in $selVtx)
|
|||
|
for($i=0;$i<size($selVtx);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($selVtx)) ) break;
|
|||
|
|
|||
|
float $vtxColor[] = `polyColorPerVertex -q -rgb $selVtx[$i]`;
|
|||
|
polyNormalPerVertex -xyz $vtxColor[0] $vtxColor[1] $vtxColor[2] $selVtx[$i];
|
|||
|
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($selVtx)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
if($num == 5)
|
|||
|
{
|
|||
|
if(size(`ls -sl`))
|
|||
|
{
|
|||
|
PolySelectConvert 3;
|
|||
|
}
|
|||
|
string $selVtx[] = `ls -sl -fl`;
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($selVtx));
|
|||
|
//for($name in $selVtx)
|
|||
|
for($i=0;$i<size($selVtx);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($selVtx)) ) break;
|
|||
|
|
|||
|
float $vtxVector[] = `polyNormalPerVertex -q -xyz $selVtx[$i]`;
|
|||
|
polyColorPerVertex -rgb $vtxVector[0] $vtxVector[1] $vtxVector[2] $selVtx[$i];
|
|||
|
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($selVtx)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
}
|
|||
|
/*
|
|||
|
global proc smoothNomalCommand()
|
|||
|
{
|
|||
|
|
|||
|
if(size(`ls -sl`))
|
|||
|
{
|
|||
|
PolySelectConvert 3;
|
|||
|
}
|
|||
|
string $selvtx[] = `ls -sl -fl`;
|
|||
|
float $smoothNum = `floatSliderGrp -q -v nomalSmoothSet_floatSliderGrp1`;
|
|||
|
for($i=0;$i<size($selvtx);$i++)
|
|||
|
{
|
|||
|
select -r $selvtx[$i];
|
|||
|
polySelectConstraint -pp 1 -t 0x0001;
|
|||
|
string $result[] = `ls -sl -fl`;
|
|||
|
float $interimVector[];
|
|||
|
for($ii=0;$ii<size($result);$ii++)
|
|||
|
{
|
|||
|
float $interimVector1[] = `polyNormalPerVertex -q -xyz $result[$ii]`;
|
|||
|
$interimVector[0] = $interimVector[0] + $interimVector1[0];
|
|||
|
$interimVector[1] = $interimVector[1] + $interimVector1[1];
|
|||
|
$interimVector[2] = $interimVector[2] + $interimVector1[2];
|
|||
|
}
|
|||
|
$interimVector[0] = $interimVector[0]/size($result);
|
|||
|
$interimVector[1] = $interimVector[1]/size($result);
|
|||
|
$interimVector[2] = $interimVector[2]/size($result);
|
|||
|
for($ii=0;$ii<size($result);$ii++)
|
|||
|
{
|
|||
|
float $interimVector1[] = `polyNormalPerVertex -q -xyz $result[$ii]`;
|
|||
|
polyNormalPerVertex -xyz ($interimVector[0]*$smoothNum + $interimVector1[0]*(1-$smoothNum))
|
|||
|
($interimVector[1]*$smoothNum + $interimVector1[1]*(1-$smoothNum))
|
|||
|
($interimVector[2]*$smoothNum + $interimVector1[2]*(1-$smoothNum)) $result[$ii];
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
select -r $selvtx;
|
|||
|
}
|
|||
|
*/
|
|||
|
global proc smoothNomalCommand()
|
|||
|
{
|
|||
|
|
|||
|
if(size(`ls -sl`))
|
|||
|
{
|
|||
|
PolySelectConvert 3;
|
|||
|
}
|
|||
|
string $selvtx[] = `ls -sl -fl`;
|
|||
|
float $smoothNum = `floatSliderGrp -q -v nomalSmoothSet_floatSliderGrp1`;
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($selvtx));
|
|||
|
for($i=0;$i<size($selvtx);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($selvtx)) ) break;
|
|||
|
|
|||
|
select -r $selvtx[$i];
|
|||
|
polySelectConstraint -pp 1 -t 0x0001;
|
|||
|
string $result[] = `ls -sl -fl`;
|
|||
|
float $interimVector[];
|
|||
|
for($ii=0;$ii<size($result);$ii++)
|
|||
|
{
|
|||
|
float $interimVector1[] = `polyNormalPerVertex -q -xyz $result[$ii]`;
|
|||
|
float $interimAveVector[] = `getAverageNormal $interimVector1`;
|
|||
|
|
|||
|
$interimVector[0] = $interimVector[0] + $interimAveVector[0];
|
|||
|
$interimVector[1] = $interimVector[1] + $interimAveVector[1];
|
|||
|
$interimVector[2] = $interimVector[2] + $interimAveVector[2];
|
|||
|
}
|
|||
|
$interimVector[0] = $interimVector[0]/size($result);
|
|||
|
$interimVector[1] = $interimVector[1]/size($result);
|
|||
|
$interimVector[2] = $interimVector[2]/size($result);
|
|||
|
float $interimVector1[] = `polyNormalPerVertex -q -xyz $selvtx[$i]`;
|
|||
|
float $interimAveVector1[] = `getAverageNormal $interimVector1`;
|
|||
|
polyNormalPerVertex -xyz ($interimVector[0]*$smoothNum + $interimAveVector1[0]*(1-$smoothNum))
|
|||
|
($interimVector[1]*$smoothNum + $interimAveVector1[1]*(1-$smoothNum))
|
|||
|
($interimVector[2]*$smoothNum + $interimAveVector1[2]*(1-$smoothNum)) $selvtx[$i];
|
|||
|
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($selvtx)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
select -r $selvtx;
|
|||
|
}
|
|||
|
global proc float [] getAverageNormal(float $getNormalXYZ[])
|
|||
|
{
|
|||
|
float $interimAveVector1[];
|
|||
|
clear $interimAveVector1;
|
|||
|
for($i=0;$i<size($getNormalXYZ);$i+=3)
|
|||
|
{
|
|||
|
$interimAveVector1[0] += $getNormalXYZ[$i];
|
|||
|
$interimAveVector1[1] += $getNormalXYZ[$i+1];
|
|||
|
$interimAveVector1[2] += $getNormalXYZ[$i+2];
|
|||
|
}
|
|||
|
$interimAveVector1[0] = $interimAveVector1[0]*3/size($getNormalXYZ);
|
|||
|
$interimAveVector1[1] = $interimAveVector1[1]*3/size($getNormalXYZ);
|
|||
|
$interimAveVector1[2] = $interimAveVector1[2]*3/size($getNormalXYZ);
|
|||
|
return $interimAveVector1;
|
|||
|
}
|
|||
|
|
|||
|
global proc nomalOffsetSpherizeCommand(int $num)
|
|||
|
{
|
|||
|
if(size(`ls -sl`))
|
|||
|
{
|
|||
|
PolySelectConvert 3;
|
|||
|
}
|
|||
|
string $sel[] = `ls -sl -fl`;
|
|||
|
float $nomalOffsetSpherizeValue = `floatSliderGrp -q -v nomalOffsetSpherizeNum_floatSliderGrp1`;
|
|||
|
float $worldPossition[];
|
|||
|
if(`objExists "nomalSpherizeLocator"`)
|
|||
|
{
|
|||
|
$worldPossition = `xform -q -t nomalSpherizeLocator`;
|
|||
|
}
|
|||
|
|
|||
|
if($num == 1)
|
|||
|
{
|
|||
|
float $possition[];
|
|||
|
if(`objExists "nomalSpherizeLocator"`)
|
|||
|
{
|
|||
|
delete nomalSpherizeLocator;
|
|||
|
}
|
|||
|
|
|||
|
if(size($sel))
|
|||
|
{
|
|||
|
string $ncluster[] = `newCluster " -envelope 1"`;
|
|||
|
string $nclusterShapes[] = `listRelatives -s $ncluster[1]`;
|
|||
|
$possition = `getAttr cluster1HandleShape.origin`;
|
|||
|
delete $ncluster;
|
|||
|
}
|
|||
|
spaceLocator -n "nomalSpherizeLocator";
|
|||
|
xform -t $possition[0] $possition[1] $possition[2] nomalSpherizeLocator;
|
|||
|
}
|
|||
|
else if($num == 11)
|
|||
|
{
|
|||
|
if(`objExists "nomalSpherizeLocator"`)
|
|||
|
{
|
|||
|
delete nomalSpherizeLocator;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
else if($num == 2)
|
|||
|
{
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($sel));
|
|||
|
for($i=0;$i<size($sel);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($sel)) ) break;
|
|||
|
|
|||
|
float $pointPossition[] = `pointPosition -w $sel[$i]`;
|
|||
|
float $bigVector[],$SpherizeVector[];
|
|||
|
$bigVector[0] = $pointPossition[0] - $worldPossition[0];
|
|||
|
$bigVector[1] = $pointPossition[1] - $worldPossition[1];
|
|||
|
$bigVector[2] = $pointPossition[2] - $worldPossition[2];
|
|||
|
|
|||
|
float $max;
|
|||
|
if(abs($bigVector[0])>abs($bigVector[1]))
|
|||
|
{
|
|||
|
$max = abs($bigVector[0]);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$max = abs($bigVector[1]);
|
|||
|
}
|
|||
|
if($max<abs($bigVector[2]))
|
|||
|
{
|
|||
|
$max = abs($bigVector[2]);
|
|||
|
}
|
|||
|
$SpherizeVector[0] = $bigVector[0]/$max;
|
|||
|
$SpherizeVector[1] = $bigVector[1]/$max;
|
|||
|
$SpherizeVector[2] = $bigVector[2]/$max;
|
|||
|
float $oldVector[] = `polyNormalPerVertex -q -xyz $sel[$i]`;
|
|||
|
polyNormalPerVertex -xyz ($oldVector[0]*(1-$nomalOffsetSpherizeValue)+$SpherizeVector[0]*$nomalOffsetSpherizeValue)
|
|||
|
($oldVector[1]*(1-$nomalOffsetSpherizeValue)+$SpherizeVector[1]*$nomalOffsetSpherizeValue)
|
|||
|
($oldVector[2]*(1-$nomalOffsetSpherizeValue)+$SpherizeVector[2]*$nomalOffsetSpherizeValue) $sel[$i];
|
|||
|
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($sel)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
else if($num == 3)
|
|||
|
{
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($sel));
|
|||
|
for($i=0;$i<size($sel);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($sel)) ) break;
|
|||
|
|
|||
|
float $pointPossition[] = `pointPosition -w $sel[$i]`;
|
|||
|
float $bigVector[],$SpherizeVector[];
|
|||
|
$bigVector[0] = $pointPossition[0] - $worldPossition[0];
|
|||
|
$bigVector[1] = $pointPossition[1] - $worldPossition[1];
|
|||
|
$bigVector[2] = $pointPossition[2] - $worldPossition[2];
|
|||
|
|
|||
|
float $max;
|
|||
|
if(abs($bigVector[0])>abs($bigVector[1]))
|
|||
|
{
|
|||
|
$max = abs($bigVector[0]);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
$max = abs($bigVector[1]);
|
|||
|
}
|
|||
|
if($max<abs($bigVector[2]))
|
|||
|
{
|
|||
|
$max = abs($bigVector[2]);
|
|||
|
}
|
|||
|
$SpherizeVector[0] = $bigVector[0]/$max;
|
|||
|
$SpherizeVector[1] = $bigVector[1]/$max;
|
|||
|
$SpherizeVector[2] = $bigVector[2]/$max;
|
|||
|
float $oldVector[] = `polyNormalPerVertex -q -xyz $sel[$i]`;
|
|||
|
polyNormalPerVertex -xyz ($oldVector[0]-$SpherizeVector[0]*$nomalOffsetSpherizeValue)
|
|||
|
($oldVector[1]-$SpherizeVector[1]*$nomalOffsetSpherizeValue)
|
|||
|
($oldVector[2]-$SpherizeVector[2]*$nomalOffsetSpherizeValue) $sel[$i];
|
|||
|
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($sel)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
global proc nomalOffsetxyzCommand(int $num)
|
|||
|
{
|
|||
|
int $EditMode = `radioButtonGrp -q -sl nomalOffset_radioButtonGrp1`;
|
|||
|
float $EditValue = `floatSliderGrp -q -v nomalOffsetNum_floatSliderGrp1`;
|
|||
|
if(size(`ls -sl`))
|
|||
|
{
|
|||
|
PolySelectConvert 3;
|
|||
|
}
|
|||
|
string $sel[] = `ls -sl -fl`;
|
|||
|
if($num == 1)
|
|||
|
{
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($sel));
|
|||
|
for($i=0;$i<size($sel);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($sel)) ) break;
|
|||
|
|
|||
|
if(`match ".vtx" $sel[$i]`!=".vtx")
|
|||
|
{
|
|||
|
warning -n "===<3D><>Ҫѡ<D2AA><D1A1>ģ<EFBFBD>͵<EFBFBD><CDB5>ٽ<EFBFBD><D9BD>в<EFBFBD><D0B2><EFBFBD>===";
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
float $lkdasfljasdfje[] = `polyNormalPerVertex -q -xyz $sel[$i]`;
|
|||
|
if($EditMode == 1)
|
|||
|
{
|
|||
|
polyNormalPerVertex -xyz ($lkdasfljasdfje[0] + $EditValue) $lkdasfljasdfje[1] $lkdasfljasdfje[2] $sel[$i];
|
|||
|
}
|
|||
|
else if($EditMode == 2)
|
|||
|
{
|
|||
|
polyNormalPerVertex -xyz ($lkdasfljasdfje[0] * (1+$EditValue)) $lkdasfljasdfje[1] $lkdasfljasdfje[2] $sel[$i];
|
|||
|
}
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($sel)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
else if($num == 2)
|
|||
|
{
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($sel));
|
|||
|
for($i=0;$i<size($sel);$i++)
|
|||
|
{
|
|||
|
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($sel)) ) break;
|
|||
|
|
|||
|
if(`match ".vtx" $sel[$i]`!=".vtx")
|
|||
|
{
|
|||
|
warning -n "===<3D><>Ҫѡ<D2AA><D1A1>ģ<EFBFBD>͵<EFBFBD><CDB5>ٽ<EFBFBD><D9BD>в<EFBFBD><D0B2><EFBFBD>===";
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
float $lkdasfljasdfje[] = `polyNormalPerVertex -q -xyz $sel[$i]`;
|
|||
|
if($EditMode == 1)
|
|||
|
{
|
|||
|
polyNormalPerVertex -xyz $lkdasfljasdfje[0] ($lkdasfljasdfje[1] + $EditValue) $lkdasfljasdfje[2] $sel[$i];
|
|||
|
}
|
|||
|
else if($EditMode == 2)
|
|||
|
{
|
|||
|
polyNormalPerVertex -xyz $lkdasfljasdfje[0] ($lkdasfljasdfje[1] * (1+$EditValue)) $lkdasfljasdfje[2] $sel[$i];
|
|||
|
}
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($sel)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
else if($num == 3)
|
|||
|
{
|
|||
|
progressWindow -t "ִ<>н<EFBFBD><D0BD><EFBFBD>:" -pr 0 -st "<22><>ǰ<EFBFBD><C7B0><EFBFBD>ȣ<EFBFBD> 0%" -ii 1 -max (size($sel));
|
|||
|
for($i=0;$i<size($sel);$i++)
|
|||
|
{
|
|||
|
if ( `progressWindow -query -isCancelled` ) break;
|
|||
|
if ( `progressWindow -query -progress` >= (size($sel)) ) break;
|
|||
|
|
|||
|
if(`match ".vtx" $sel[$i]`!=".vtx")
|
|||
|
{
|
|||
|
warning -n "===<3D><>Ҫѡ<D2AA><D1A1>ģ<EFBFBD>͵<EFBFBD><CDB5>ٽ<EFBFBD><D9BD>в<EFBFBD><D0B2><EFBFBD>===";
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
float $lkdasfljasdfje[] = `polyNormalPerVertex -q -xyz $sel[$i]`;
|
|||
|
if($EditMode == 1)
|
|||
|
{
|
|||
|
polyNormalPerVertex -xyz $lkdasfljasdfje[0] $lkdasfljasdfje[1] ($lkdasfljasdfje[2] + $EditValue) $sel[$i];
|
|||
|
}
|
|||
|
else if($EditMode == 2)
|
|||
|
{
|
|||
|
polyNormalPerVertex -xyz $lkdasfljasdfje[0] $lkdasfljasdfje[1] ($lkdasfljasdfje[2] * (1+$EditValue)) $sel[$i];
|
|||
|
}
|
|||
|
progressWindow -e -pr $i -st ("<22><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>: "+($i/(size($sel)))+"%");
|
|||
|
}
|
|||
|
progressWindow -ep;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
global proc EditVertixNomalUI()
|
|||
|
{
|
|||
|
if(`window -ex EditVertixNomalWin`)
|
|||
|
{
|
|||
|
deleteUI EditVertixNomalWin;
|
|||
|
}
|
|||
|
window -t "<22><>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱༭<DFB1><E0BCAD><EFBFBD><EFBFBD>V1.0" EditVertixNomalWin;
|
|||
|
window -e -wh 400 646 EditVertixNomalWin;
|
|||
|
columnLayout -adj 1 -bgc 0.18 0.18 0.18 EditVertixNomalMain_columnLayout1;
|
|||
|
separator -h 10 EditVertixNomal_separator0;
|
|||
|
text -l "<22><><EFBFBD><EFBFBD>ƫ<EFBFBD><C6AB>" -bgc 0 0 0 nomalOffset_text1;
|
|||
|
|
|||
|
separator -h 10 EditVertixNomal_separator1;
|
|||
|
|
|||
|
formLayout -nd 100 nomalOffset_formLayout1;
|
|||
|
radioButtonGrp -nrb 2 -l "<22>㷨" -la2 "<22><>" "<22><>" -cal 1 "center" -sl 1 nomalOffset_radioButtonGrp1;
|
|||
|
|
|||
|
floatSliderGrp -l "<22><><EFBFBD><EFBFBD>:" -f true -cal 1 "center"
|
|||
|
-min -1.0 -max 1.0 -fmn -10.0 -fmx 10.0 -v 0.2
|
|||
|
-s 0.01 nomalOffsetNum_floatSliderGrp1;
|
|||
|
|
|||
|
button -l "X" -c "nomalOffsetxyzCommand 1;" nomalOffsetx_button1;
|
|||
|
button -l "Y" -c "nomalOffsetxyzCommand 2;" nomalOffsety_button1;
|
|||
|
button -l "Z" -c "nomalOffsetxyzCommand 3;" nomalOffsetz_button1;
|
|||
|
|
|||
|
formLayout -e
|
|||
|
-af nomalOffset_radioButtonGrp1 "left" 1
|
|||
|
-af nomalOffset_radioButtonGrp1 "right" 1
|
|||
|
|
|||
|
-af nomalOffsetNum_floatSliderGrp1 "left" 1
|
|||
|
-af nomalOffsetNum_floatSliderGrp1 "right" 1
|
|||
|
-ac nomalOffsetNum_floatSliderGrp1 "top" 5 nomalOffset_radioButtonGrp1
|
|||
|
|
|||
|
-af nomalOffsetx_button1 "left" 1
|
|||
|
-ap nomalOffsetx_button1 "right" 3 33
|
|||
|
-ac nomalOffsetx_button1 "top" 5 nomalOffsetNum_floatSliderGrp1
|
|||
|
|
|||
|
-ac nomalOffsety_button1 "left" 3 nomalOffsetx_button1
|
|||
|
-ap nomalOffsety_button1 "right" 3 66
|
|||
|
-ac nomalOffsety_button1 "top" 5 nomalOffsetNum_floatSliderGrp1
|
|||
|
|
|||
|
-ac nomalOffsetz_button1 "left" 3 nomalOffsety_button1
|
|||
|
-af nomalOffsetz_button1 "right" 1
|
|||
|
-ac nomalOffsetz_button1 "top" 5 nomalOffsetNum_floatSliderGrp1
|
|||
|
|
|||
|
nomalOffset_formLayout1;
|
|||
|
|
|||
|
setParent EditVertixNomalMain_columnLayout1;
|
|||
|
separator -h 10 EditVertixNomal_separator2;
|
|||
|
|
|||
|
text -l "<22><><EFBFBD>䷨<EFBFBD><E4B7A8>" -bgc 0 0 0 nomalOffsetSpherize_text1;
|
|||
|
separator -h 10 EditVertixNomal_separator3;
|
|||
|
formLayout -nd 100 nomalOffsetSpherize_formLayout1;
|
|||
|
|
|||
|
button -l "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" -c "nomalOffsetSpherizeCommand 1" -ann "<22><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>Ķ<EFBFBD>λ<EFBFBD>Ķ<EFBFBD>λ<EFBFBD><CEBB>" createNormalCenter_button1;
|
|||
|
button -l "ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" -c "nomalOffsetSpherizeCommand 11" deleteNormalCenter_button1;
|
|||
|
|
|||
|
floatSliderGrp -l "<22><><EFBFBD><EFBFBD>:" -f true -cal 1 "center"
|
|||
|
-min 0 -max 1.0 -fmn 0 -fmx 1 -v 0.2
|
|||
|
-s 0.01 nomalOffsetSpherizeNum_floatSliderGrp1;
|
|||
|
|
|||
|
button -l "<22><><EFBFBD><EFBFBD>" -c "nomalOffsetSpherizeCommand 2" aggregationVertixNomal_button1;
|
|||
|
button -l "<22><>£" -c "nomalOffsetSpherizeCommand 3" dispersedVertixNomal_button1;
|
|||
|
|
|||
|
formLayout -e
|
|||
|
|
|||
|
-af createNormalCenter_button1 "left" 1
|
|||
|
-ap createNormalCenter_button1 "right" 3 50
|
|||
|
|
|||
|
-ac deleteNormalCenter_button1 "left" 3 createNormalCenter_button1
|
|||
|
-af deleteNormalCenter_button1 "right" 1
|
|||
|
|
|||
|
-af nomalOffsetSpherizeNum_floatSliderGrp1 "left" 1
|
|||
|
-af nomalOffsetSpherizeNum_floatSliderGrp1 "right" 1
|
|||
|
-ac nomalOffsetSpherizeNum_floatSliderGrp1 "top" 1 createNormalCenter_button1
|
|||
|
|
|||
|
-af aggregationVertixNomal_button1 "left" 1
|
|||
|
-ap aggregationVertixNomal_button1 "right" 3 50
|
|||
|
-ac aggregationVertixNomal_button1 "top" 1 nomalOffsetSpherizeNum_floatSliderGrp1
|
|||
|
|
|||
|
-ac dispersedVertixNomal_button1 "left" 3 aggregationVertixNomal_button1
|
|||
|
-af dispersedVertixNomal_button1 "right" 1
|
|||
|
-ac dispersedVertixNomal_button1 "top" 1 nomalOffsetSpherizeNum_floatSliderGrp1
|
|||
|
|
|||
|
nomalOffsetSpherize_formLayout1;
|
|||
|
|
|||
|
setParent EditVertixNomalMain_columnLayout1;
|
|||
|
separator -h 10 EditVertixNomal_separator4;
|
|||
|
|
|||
|
text -l "ƽ<><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" -bgc 0 0 0 nomalSmoothSet_text1;
|
|||
|
|
|||
|
separator -h 10 EditVertixNomal_separator5;
|
|||
|
formLayout -nd 100 nomalSmoothSet_formLayout1;
|
|||
|
|
|||
|
floatSliderGrp -l "<22><><EFBFBD><EFBFBD>:" -f true -cal 1 "center"
|
|||
|
-min 0 -max 1.0 -fmn 0 -fmx 1 -v 0.2
|
|||
|
-s 0.01 nomalSmoothSet_floatSliderGrp1;
|
|||
|
|
|||
|
button -l "ƽ<><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" -c "smoothNomalCommand" nomalSmoothSet_button1;
|
|||
|
|
|||
|
formLayout -e
|
|||
|
|
|||
|
-af nomalSmoothSet_floatSliderGrp1 "left" 1
|
|||
|
-af nomalSmoothSet_floatSliderGrp1 "right" 1
|
|||
|
|
|||
|
-af nomalSmoothSet_button1 "left" 1
|
|||
|
-af nomalSmoothSet_button1 "right" 1
|
|||
|
-ac nomalSmoothSet_button1 "top" 5 nomalSmoothSet_floatSliderGrp1
|
|||
|
|
|||
|
nomalSmoothSet_formLayout1;
|
|||
|
|
|||
|
|
|||
|
setParent EditVertixNomalMain_columnLayout1;
|
|||
|
separator -h 10 EditVertixNomal_separator6;
|
|||
|
|
|||
|
formLayout -nd 100 nomalOffsetReset_formLayout1;
|
|||
|
button -l "<22><><EFBFBD><EFBFBD>" -c "polySetToFaceNormal" nomalOffsetReset_button1;
|
|||
|
button -l "<22><><EFBFBD><EFBFBD>" -c "polyAverageNormal -d 0" nomalOffsetSmooth_button1;
|
|||
|
button -l "<22><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>" -c "polyOptions -dn 1 -pt" disPlayNormal_button1;
|
|||
|
button -l "<22><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>" -c "polyOptions -dn 0 -pt" hideNormal_button1;
|
|||
|
floatSliderGrp -l "<22><><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>:" -f true -cal 1 "center"
|
|||
|
-min 0 -max 10.0 -fmn 0 -fmx 10 -v 0.3
|
|||
|
-s 0.01 -cc ("polyOptions -activeObjects -sizeNormal `floatSliderGrp -q -v nomalSizeSet_floatSliderGrp1`") nomalSizeSet_floatSliderGrp1;
|
|||
|
|
|||
|
formLayout -e
|
|||
|
|
|||
|
-af nomalOffsetReset_button1 "left" 1
|
|||
|
-ap nomalOffsetReset_button1 "right" 3 50
|
|||
|
|
|||
|
-ac nomalOffsetSmooth_button1 "left" 3 nomalOffsetReset_button1
|
|||
|
-af nomalOffsetSmooth_button1 "right" 1
|
|||
|
|
|||
|
-af nomalSizeSet_floatSliderGrp1 "left" 1
|
|||
|
-af nomalSizeSet_floatSliderGrp1 "right" 1
|
|||
|
-ac nomalSizeSet_floatSliderGrp1 "top" 3 nomalOffsetSmooth_button1
|
|||
|
|
|||
|
-af disPlayNormal_button1 "left" 1
|
|||
|
-ap disPlayNormal_button1 "right" 3 50
|
|||
|
-ac disPlayNormal_button1 "top" 3 nomalSizeSet_floatSliderGrp1
|
|||
|
|
|||
|
-ac hideNormal_button1 "left" 3 disPlayNormal_button1
|
|||
|
-af hideNormal_button1 "right" 1
|
|||
|
-ac hideNormal_button1 "top" 3 nomalSizeSet_floatSliderGrp1
|
|||
|
|
|||
|
|
|||
|
|
|||
|
nomalOffsetReset_formLayout1;
|
|||
|
|
|||
|
setParent EditVertixNomalMain_columnLayout1;
|
|||
|
|
|||
|
separator -h 10 EditVertixNomal_separator7;
|
|||
|
|
|||
|
text -l "<22><><EFBFBD><EFBFBD>ɫ <=> <20><><EFBFBD><EFBFBD>" -bgc 0 0 0 VertexColorToNormal_text1;
|
|||
|
|
|||
|
formLayout -nd 100 VertexColorToNormal_formLayout1;
|
|||
|
|
|||
|
separator -h 10 VertexColorToNormalCurrentColorSet_separator1;
|
|||
|
|
|||
|
optionMenu -l "<22><>ǰɫ<C7B0><C9AB>" -cc ("polyColorSet -ccs -cs `optionMenu -q -v VertexColorToNormalCurrentColorSet_optionMenu1`") VertexColorToNormalCurrentColorSet_optionMenu1;
|
|||
|
button -l "ˢ<><CBA2>" -c "VertexColorToNormalCommand 1" VertexColorToNormalRefreshColorSet_button1;
|
|||
|
|
|||
|
text -l "<22><><EFBFBD><EFBFBD>" VertexColorToNormalCreateColorSet_text1;
|
|||
|
textField -text "" VertexColorToNormalCreateColorSet_textField1;
|
|||
|
button -l "<22>½<EFBFBD>ɫ<EFBFBD><C9AB>" -c "VertexColorToNormalCommand 2" VertexColorToNormalCreateColorSet_button1;
|
|||
|
|
|||
|
button -l "ɾ<><C9BE><EFBFBD><EFBFBD>ǰɫ<C7B0><C9AB>" -c "VertexColorToNormalCommand 3" VertexColorToNormalDeleteColorSet_button1;
|
|||
|
|
|||
|
separator -h 10 VertexColorToNormalCurrentColorSet_separator2;
|
|||
|
|
|||
|
button -l "<22><><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD>ɫ" -c "PaintVertexColorTool" VertexColorToNormalDrawVertexColor_button1;
|
|||
|
|
|||
|
button -l "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" -c "toolPropertyWindow" VertexColorToNormalDrawVertexToolSet_button1;
|
|||
|
|
|||
|
button -l "<22><><EFBFBD><EFBFBD>ɫ=><3E><><EFBFBD><EFBFBD>" -c "VertexColorToNormalCommand 4" VertexColorToNormalConvertToNormal_button1;
|
|||
|
|
|||
|
button -l "<22><><EFBFBD><EFBFBD>=><3E><><EFBFBD><EFBFBD>ɫ" -c "VertexColorToNormalCommand 5" VertexColorToNormalConvertToVertexColor_button1;
|
|||
|
|
|||
|
separator -h 10 VertexColorToNormalCurrentColorSet_separator3;
|
|||
|
|
|||
|
formLayout -e
|
|||
|
|
|||
|
-af VertexColorToNormalCurrentColorSet_separator1 "left" 1
|
|||
|
-af VertexColorToNormalCurrentColorSet_separator1 "right" 1
|
|||
|
|
|||
|
-af VertexColorToNormalCurrentColorSet_optionMenu1 "left" 1
|
|||
|
-af VertexColorToNormalCurrentColorSet_optionMenu1 "right" 100
|
|||
|
-ac VertexColorToNormalCurrentColorSet_optionMenu1 "top" 5 VertexColorToNormalCurrentColorSet_separator1
|
|||
|
|
|||
|
-ac VertexColorToNormalRefreshColorSet_button1 "left" 3 VertexColorToNormalCurrentColorSet_optionMenu1
|
|||
|
-af VertexColorToNormalRefreshColorSet_button1 "right" 1
|
|||
|
-ac VertexColorToNormalRefreshColorSet_button1 "top" 5 VertexColorToNormalCurrentColorSet_separator1
|
|||
|
|
|||
|
-af VertexColorToNormalCreateColorSet_textField1 "left" 55
|
|||
|
-af VertexColorToNormalCreateColorSet_textField1 "right" 100
|
|||
|
-ac VertexColorToNormalCreateColorSet_textField1 "top" 5 VertexColorToNormalCurrentColorSet_optionMenu1
|
|||
|
|
|||
|
-af VertexColorToNormalCreateColorSet_text1 "left" 1
|
|||
|
-ac VertexColorToNormalCreateColorSet_text1 "right" 3 VertexColorToNormalCreateColorSet_textField1
|
|||
|
-ac VertexColorToNormalCreateColorSet_text1 "top" 5 VertexColorToNormalCurrentColorSet_optionMenu1
|
|||
|
|
|||
|
-ac VertexColorToNormalCreateColorSet_button1 "left" 3 VertexColorToNormalCreateColorSet_textField1
|
|||
|
-af VertexColorToNormalCreateColorSet_button1 "right" 1
|
|||
|
-ac VertexColorToNormalCreateColorSet_button1 "top" 5 VertexColorToNormalCurrentColorSet_optionMenu1
|
|||
|
|
|||
|
-af VertexColorToNormalDeleteColorSet_button1 "left" 1
|
|||
|
-af VertexColorToNormalDeleteColorSet_button1 "right" 1
|
|||
|
-ac VertexColorToNormalDeleteColorSet_button1 "top" 5 VertexColorToNormalCreateColorSet_button1
|
|||
|
|
|||
|
-af VertexColorToNormalCurrentColorSet_separator2 "left" 1
|
|||
|
-af VertexColorToNormalCurrentColorSet_separator2 "right" 1
|
|||
|
-ac VertexColorToNormalCurrentColorSet_separator2 "top" 1 VertexColorToNormalDeleteColorSet_button1
|
|||
|
|
|||
|
-af VertexColorToNormalDrawVertexColor_button1 "left" 1
|
|||
|
-ap VertexColorToNormalDrawVertexColor_button1 "right" 3 50
|
|||
|
-ac VertexColorToNormalDrawVertexColor_button1 "top" 5 VertexColorToNormalCurrentColorSet_separator2
|
|||
|
|
|||
|
-ac VertexColorToNormalDrawVertexToolSet_button1 "left" 3 VertexColorToNormalDrawVertexColor_button1
|
|||
|
-af VertexColorToNormalDrawVertexToolSet_button1 "right" 1
|
|||
|
-ac VertexColorToNormalDrawVertexToolSet_button1 "top" 5 VertexColorToNormalCurrentColorSet_separator2
|
|||
|
|
|||
|
-af VertexColorToNormalConvertToNormal_button1 "left" 1
|
|||
|
-ap VertexColorToNormalConvertToNormal_button1 "right" 3 50
|
|||
|
-ac VertexColorToNormalConvertToNormal_button1 "top" 5 VertexColorToNormalDrawVertexToolSet_button1
|
|||
|
|
|||
|
-ac VertexColorToNormalConvertToVertexColor_button1 "left" 3 VertexColorToNormalConvertToNormal_button1
|
|||
|
-af VertexColorToNormalConvertToVertexColor_button1 "right" 1
|
|||
|
-ac VertexColorToNormalConvertToVertexColor_button1 "top" 5 VertexColorToNormalDrawVertexToolSet_button1
|
|||
|
|
|||
|
-af VertexColorToNormalCurrentColorSet_separator3 "left" 1
|
|||
|
-af VertexColorToNormalCurrentColorSet_separator3 "right" 1
|
|||
|
-ac VertexColorToNormalCurrentColorSet_separator3 "top" 1 VertexColorToNormalConvertToVertexColor_button1
|
|||
|
|
|||
|
VertexColorToNormal_formLayout1;
|
|||
|
|
|||
|
showWindow EditVertixNomalWin;
|
|||
|
|
|||
|
VertexColorToNormalCommand 1;
|
|||
|
}
|
|||
|
EditVertixNomalUI;
|