Notifications
Clear all

[Closed] using python to loop through modifiers

So it appears that when attempting to loop through the modifiers of a given node, it only returns non-worldspace modifiers as seen below.

For example I have a box with these modifier:

  • Point Cache Binding (WS)
  • Cap Holes
  • Camera Map Modifier
  • Bend

When I run this code:


c = @"
node = MaxPlus.INode.GetINodeByName('Box001')
mod_count = node.GetNumModifiers()
print mod_count
for x in range(0, mod_count):
	mod = node.GetModifier(x)
	print mod.GetName()
			
"
python.execute c

returns


>> 3
>> Cap Holes
>> Camera Map Modifier
>> Bend

1 Reply
 JHN

I have no straight answer, but WS modifiers don’t just live on top of the stack, the live after all transforms are calculated, so top of stack is just a visual thing, I think you need to dig deeper in the SDK to find where they really are, as python is more like sdk/maxplus.

-Johan