Hello,
I'm actually encouring strange behaviour with Nightshade UvEditor when i rotate my uv shell. The rotation is not based on the Shell Pivot and i don't understand why ...
This happen as well for mirroring uvs ...
For exemple on the next screenshot before the rotation the shell is inside 0 and 1 uv coordinate.
But
After roation it within 0 and -1 ...
Can someone help me ?
Replies
The mirror and rotate -functions work around the last known pivot position, and in the screenshot it seems that you placed the pivot in origo.
If you need to reset the pivot position to the shell center, simply switch to another manipulation tool (W, E or R button).
If you for some reason ONLY get transformations around origo then something is wrong. The pivot coordinates are stored in the global var $manipCoords, and is frequently updated by the function updateManipCoords(). If that function for some reason does not work, then you get stuck with 0.0 as the default setting for the pivot (that value is defined to $manipCoords when you startup Nightshade UV Editor).
Moderator:
Please merge this thread with this one: http://www.polycount.com/forum/showthread.php?t=105380
Pressing the W. E, R button don't reset the pivot position to shell center. --> it does but if after i try to rotate the shell via the Nightshade UI the rotation is still based on "Global" pivot ...
I think you must force the use of shell pivot within the script. Do you have any other solution ?
I use Maya 2014.
Then write:
whatIs updateManipCoords
...and execute that
If the script editor does not say that the MEL procedure is found in X:/ path /scripts/NightshadeUVEditor.mel then the script haven't been sourced correctly.
If that's all clear, then execute the following in the script editor:
updateManipCoords;
...does that generate an error? If it does, please post the error code (line number, etc)
whatIs updateManipCoords;
// Result: Mel procedure found in: C:/Users/mbongiorno/Documents/maya/2014-x64/scripts/NightshadeUVEditor.mel //
// Result: scriptEditorPanel1Window|TearOffPane|scriptEditorPanel1|formLayout84|formLayout86|paneLayout2|formLayout87|tabLayout8|formLayout88|cmdScrollFieldExecuter1 //
updateManipCoords;
# Error: line 1: NameError: file <maya console> line 1: name 'updateManipCoords' is not defined #
// Result: scriptEditorPanel1Window|TearOffPane|scriptEditorPanel1|formLayout84|formLayout86|paneLayout2|formLayout87|tabLayout8|formLayout89|cmdScrollFieldExecuter2 //
I'm not sure yet why this is happening. If you copy+paste and execute this code in the Maya script editor, what happens?
global proc float[] updateManipCoords()
{
string $cTool = "";
$cTool = currentCtx();
global float $manipCoords[];
switch($cTool)
{
case "moveSuperContext":
// Move
$manipCoords = `texMoveContext -q -position texMoveContext`;
break;
case "RotateSuperContext":
// Rotate
$manipCoords = `texRotateContext -q -position texRotateContext`;
break;
case "scaleSuperContext":
// Scale
$manipCoords = `texScaleContext -q -position texScaleContext`;
break;
}
return $manipCoords;
}
This is what i get if i execute the code you already provide.
It's a strange problem, and I can't really fix it because I would need a Maya 2014 installation for that (our studio sadly doesn't). You are not the first one to report a problem in 2014 though, so as soon as I get a copy I can start bugfixing.
added at the end and got the xy position of the pivot.
Is it fixing the problem ?