Message 1 of 10
Trying to create a UVW flattener but having issues.

Not applicable
03-18-2009
09:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Just getting into Maxscript after having a scene that I had to flatten the UVW maps of lots of models, but I can't seem to get my test script to work in the way I think it should work.
What I want to happen is this:
A Unwrap UVW is applied to an object
The Channel of the UVW is set to 2
The Unwrap UVW is in Face Sub Object Mode
Then the faces are flattened.
Here is my script
The box is created as a test. The Unwrap UVW does get applied and the channel is set to 2, but it doesn't go into Face Subobject mode and doesn't flatten the map. Any ideas?
Just getting into Maxscript after having a scene that I had to flatten the UVW maps of lots of models, but I can't seem to get my test script to work in the way I think it should work.
What I want to happen is this:
A Unwrap UVW is applied to an object
The Channel of the UVW is set to 2
The Unwrap UVW is in Face Sub Object Mode
Then the faces are flattened.
Here is my script
mybox = box length:20 width:40 height:60
convertto mybox editable_poly
Unwrapper = Unwrap_UVW()
Unwrapper.setApplyToWholeObject true
addModifier mybox (Unwrapper)
Unwrapper.setMapChannel 2
mybox.Unwrapper.setTVSubObjectMode 3
Unwrapper.flattenMap 45.0 #() 0.001 true 0 true true
The box is created as a test. The Unwrap UVW does get applied and the channel is set to 2, but it doesn't go into Face Subobject mode and doesn't flatten the map. Any ideas?