The goal of this script is to make a tool that will move all normals with individual offsets relative to their position. currently moving batch normals (with the maya tool) results in all normals facing the exact same direction. This is not good for spheres or pretty much anything else with a curve to it. The problem i have is when i put a slider for each axis and pass that variable into the "polyNormalPerVertex" for the axis it only registers on the 0 or 180 degrees. here is the script:
window -h 50 -w 50 -s true -t normalEdit;
columnLayout;
string $xSlider = floatSliderGrp -dc "xSet(floatSliderGrp -q -v $xSlider)" //slider that sends its float to proc xSetfloatSliderGrp -q -v $xSlider
-cc "xSet()";
-min -1.0 -max 1.0 -f true -l X -pre 4
string $ySlider = floatSliderGrp -dc "ySet(floatSliderGrp -q -v $ySlider)" //slider that sends its float to proc ySetfloatSliderGrp -q -v $ySlider
-cc "ySet()";
-min -1.0 -max 1.0 -f true -l Y -pre 4
string $zSlider = floatSliderGrp -dc "zSet(floatSliderGrp -q -v $zSlider)" //slider that sends its float to proc zSetfloatSliderGrp -q -v $zSlider
-cc "zSet()";
-min -1.0 -max 1.0 -f true -l Z -pre 4
showWindow;
proc xSet(float $xOffSet){
//string $verts[] = filterExpand -selectionMask 31; //store object's verts in an array
//$numVerts = size $verts; //sore how many verts in array
polyNormalPerVertex -rel -x $xOffSet; //todo loop through verts and adjust them individually
print $xOffSet;
};
proc ySet(float $yOffSet){
//string $verts[] = filterExpand -selectionMask 31;
//$numVerts = size $verts;
polyNormalPerVertex -rel -y $yOffSet;
print $yOffSet;
};
proc zSet(float $zOffSet){
//string $verts[] = filterExpand -selectionMask 31;
//$numVerts = size $verts;
polyNormalPerVertex -rel -z $zOffSet;
print $zOffSet;
};