Notifications
Clear all

[Closed] Mapping Align with Unwrap modifier

Hi all,
I’m working on my second script and so far I’ve only run into obstacles, but that’s all part of the fun when learning something new! Most of my problems I’ve found answers to here, but there’s on that’s stuck with me all along which I can’t seem to solve.
I’m trying to create a script which adds an Unwrap Modifier and then walks through all faces adding a planar map with Best Align as align mode to each one. I’ve managed to create a script which does all that, except for that last step, adding best align. I get no error messages, no nothing, it just doesn’t work.
This is what the code looks like:

I appreciate all the help I can get!
Any ideas?

		on map pressed do
		(
			addmod Unwrap_UVW
			for i = 1 to numberofaces.value do
			(			
				subobjectLevel = 3
				$.modifiers[#Unwrap_UVW].selectByMatID i
				$.modifiers[#unwrap_uvw].unwrap5.mappingMode 1
				$.modifiers[#unwrap_uvw].unwrap5.mappingAlign 3
				subobjectLevel = 0

		)
			)
2 Replies

Hi Kinten, take a look in the maxScript help, under the “frequently asked questions”, there´s an topic called:

“How do I align the UVW modifier´s gizmo to a selected face”

Wow, do I feel stupid.
I guess that’s what you get when you rely too much on cgtalk and google.
Thanks a lot!