Rotate Unwrap UVW modifier gizmo 90*

Does anyone know if there is a simpler way to target the gizmo in the Unwrap UVW modifier (not the UVW Mapping modifier) and rotate it 90 degrees though maxscript?
I am currently using the unwrap5.setGizmoTM matrix but this isn't accurate enough for what I am trying to create.

Any help is appreciated.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
JokerMartini's picture

Random rotate

randomly rotate uvw map mod

rollout t "Test"
(
	local mymod = (UVWMap())
 
	button b "Create UVWMap"
	button b2 "Random"
 
	on b pressed do
	(
		mapMod = UVWMap maptype:4
		addmod =  for i in selection do addModifier i (mapMod) ui:on
	)
 
	on b2 pressed do 
	(
		for i = 1 to selection.count do
		(
			obj = selection[i]
			giz =obj.modifiers[1].gizmo
			val = (random -360 360)
			giz.rotation = (angleaxis val [1,1,1]) as quat
		)
	)
 
)
createdialog t

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

barigazy's picture

Hi John, Now try with

Hi John,
Now try with UnvrapUVW modifier :)

bga

barigazy's picture

example

I came up with this
I use Box object with UnwrapUVW Mod with BoxMap projection

unwrapTM = $Box001.modifiers[#Unwrap_UVW].getGizmoTM()
tp = unwrapTM.translationpart
--rotate about Z-axis
rot = rotateZ unwrapTM 90
rot.row4 = tp
$Box001.modifiers[#Unwrap_UVW].setGizmoTM rot

bga

wiesner's picture

Works great. Thank you for

Works great. Thank you for your help.

barigazy's picture

:)

My pleasure
Cheers!

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.