CollapseNodeTo works every second execution.

Have selected EP object, trying to assign UnwrapUVW and then collapseTo the stack.
For some strange reason Unwrap modifier stays 1st time I run the script and gets killed 2nd time.
Same code work like a charm if executed line-by-line, another thing that bugs me is that CollapseNodeTo returns "true" even if it failed.

Here is the code:

addModifier $ (Unwrap_UVW ())
maxOps.CollapseNodeTo $ 1 off

What am I doing wrong?

Comments

Comment viewing options

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

I need CollapseNodeTo to

I need CollapseNodeTo to keep instances.

Right now I'm using workaround suggested by IN_Human
-create node(tempnode)
-copy baseobject from source object to tempnode
-store baseobject of source object for later comparison
-make all stack operation on tempnode and collapse it (CollapseNode)
-copy baseobject back, from tempnode to source object
-cycle through all object and compare its baseobject to previously stored baseobject, if it matches(an instance of source object), then copy tempnode baseobject to this object too

decapitator's picture

since your collapsing to the

since your collapsing to the 1st modifier in the stack just a simple:

maxOps.CollapseNode $ true
--Would do fine as tested with 100 objects using:
for obj in geometry do maxOps.CollapseNode obj true

Cheers

flyingc's picture

it seems that the results is

it seems that the results is same for evevry type object that can converttomesh

Comment viewing options

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