The ,appingchannel is properly changed, but flattening did not work at all
The funny thing about this is, that if I return the Unwrapper object and call the line
– i think the flatten is different to each object.
– so the flatten command should after some objects.
– and after flatten, the flattenMap is different too .
Second day, and you have already hit a strange behaviour of the modifier stack!
This is really a very special case - what happens is that the modifier is added to the modifier stack, but the stack has not been properly updated internally when you call the flattenMap() function.
What you have to do just before calling the flattenMap() is to force an update of the stack. There are multiple ways to do this, including
classof _Object --probably the fastest way, although it looks like a hack
max modify mode --relatively fast, but updating the UI can still be slower than classof()
max select none --relatively slow, as it has to change the selection and redraw viewports
select _Object
function AO_UVWUnwrap _Object =
(
Unwrapper = UVWunwrap()
Unwrapper.setApplyToWholeObject true
addModifier _Object (Unwrapper)
Unwrapper.setMapChannel 2
classof _Object --asks for the class on top of the stack, thus forces an internal update
Unwrapper.flattenMap 45.0 #() 0.001 true 0 true true
)
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.