PDA

View Full Version : Unwrap UVW Issue driving me crazy!


Gibbz
02-21-2006, 08:40 AM
Ok the usuall problem, i keep posting in one form or another and noone ever seems to know whats going on...

Anyway this scenario is a little different.

Ok the problem stems from changin the map channel in the unwrap modifier, after changing the map channel the modifier seem to not respond to my maxscript...

Ok heres my code....


myobj = $ -- just for testing...

modPanel.addModToSelection (Unwrap_UVW ()) ui:on
myObj.modifiers[#unwrap_uvw].unwrap.setMapChannel 2 --script goes bung after here!
subobjectLevel = 1
myObj.modifiers[#unwrap_uvw].unwrap.edit ()
myObj.modifiers[#unwrap_uvw].unwrap5.setSelectedGeomVerts mySelection --this doesnt work when not on map channel 1!!! WHY?!
myObj.modifiers[#unwrap_uvw].unwrap.moveX 0


There must either be serious bugs with the unwrap modifier or im doing something so stupid i cannot figure it out :|

Any help appreciated.

Thanks
Bronson


EDIT: Odd, seems to work in a blank script, could it be something such as a rollout?

Gibbz
02-21-2006, 08:57 AM
Ok this is even more crazy.

If i use either Try() or undo() or use them together, the script does not work. Any ideas why this is? Any work arounds?


try
(
undo on
(

subobjectLevel = 0
modPanel.addModToSelection (Unwrap_UVW ()) ui:on
$.modifiers[#unwrap_uvw].unwrap.setMapChannel 2
subobjectLevel = 1
$.modifiers[#unwrap_uvw].unwrap.edit ()
$.modifiers[#unwrap_uvw].unwrap5.setSelectedGeomVerts #{1..15}
$.modifiers[#unwrap_uvw].unwrap2.syncTVSelection() --sweet fix!
$.modifiers[#unwrap_uvw].unwrap.moveX 0

)
)
catch (format "Align U 0 Error: % \n" (getCurrentException()))

Moosley
02-21-2006, 09:40 AM
Just a thought, stab in the dark if you will, but do you need to turn on map support and adding some map verts for channel 2 before adding the modifier?


mesh/polyop.setMapSupport $ 2 true
mesh/polyop.setNumMapVerts $ ((GetTriMeshFaceCount $)[1]*3)

Gibbz
02-21-2006, 09:12 PM
I already have channel 2 mapping data. Ill give it a try with vertex color chanel see if that has the same probem

CGTalk Moderation
02-21-2006, 09:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.