Rotate UVW +90 & -90

Rotate UVW +90 & -90

Anonymous
Not applicable
1,369 Views
6 Replies
Message 1 of 7

Rotate UVW +90 & -90

Anonymous
Not applicable
I'm trying to rotate a selected face via maxscript +90 degrees and -90 degrees in the Unwrap UVW Modifier.

I can mirror using...

$.modifiers.unwrap.mirrorv ()
$.modifiers.unwrap.mirrorh ()

But can't figure out how to rotate +90 and -90, listener doesn't pick up anything when I use the rotate buttons in the Unwrap dialogue.

tia
0 Likes
1,370 Views
6 Replies
Replies (6)
Message 2 of 7

PiXeL_MoNKeY
Collaborator
Collaborator
From the maxscript help > Unwrap_UVW > Transform Selected:
<void><Unwrap_UVW>.rotateSelectedCenter <float>angle

Rotates the selected sub-objects at the specified angle using the selection center.
<void><Unwrap_UVW>.rotateSelected <float>angle <point3>axis

Moves the selected sub-objects at the specified offset about the specified axis.
The second one should be rotates, but that is copied direct from the Maxscript Help.

-Eric
0 Likes
Message 3 of 7

Anonymous
Not applicable
Thx Eric...that's the code i was trying to get to work, but in that format makes no sense to me.
I rotate in the Unwrap uvw with angle snap set to 90 degrees, and get this from the listener....

$.modifiers.unwrap2.RotateSelectedCenter 1.85878
$.modifiers.unwrap2.RotateSelectedCenter 0.933751
$.modifiers.unwrap2.RotateSelectedCenter 1.19555
$.modifiers.unwrap2.RotateSelectedCenter 1.14319
$.modifiers.unwrap2.RotateSelectedCenter 0.898845
$.modifiers.unwrap2.RotateSelectedCenter 1.40499
$.modifiers.unwrap2.RotateSelectedCenter 1.62316
$.modifiers.unwrap2.RotateSelectedCenter 1.16064
$.modifiers.unwrap2.RotateSelectedCenter 1.78024
$.modifiers.unwrap2.RotateSelectedCenter 1.46608
$.modifiers.unwrap2.RotateSelectedCenter 1.13446
$.modifiers.unwrap2.RotateSelectedCenter 1.37881
$.modifiers.unwrap2.RotateSelectedCenter 1.16064
$.modifiers.unwrap2.RotateSelectedCenter 1.19555

It seems to work, but I'm not sure how precise the 1.85878 is or what value to use for a precise 90 degrees.

thx
0 Likes
Message 4 of 7

Anonymous
Not applicable
Ahh...s'ok got it fixed.... I typed "90 degrees in decimal" in google and got 1.57079633 🙂
That's much better 😉

thanks
0 Likes
Message 5 of 7

Steve_Curley
Mentor
Mentor
2*PI radians = 360 degrees.
2*PI/4 = 1.57079633 = 90 degrees 😉

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 6 of 7

PiXeL_MoNKeY
Collaborator
Collaborator
Or simply use the built in conversion tools:
Angle Conversion Methods
degToRad <number>
Returns the conversion of the number from degrees to radians. The result is always a float.

radToDeg <number>
Returns the conversion of the number from radians to degrees. The result is always a float.
A lot of the time when it comes to rotations the values will be a float radians rather than degrees.
$.modifiers.unwrap2.RotateSelectedCenter (degToRad 90.0)

-Eric
0 Likes
Message 7 of 7

Anonymous
Not applicable
Thx guys, that's comprehensively covered, and it works a treat.
0 Likes