Using Python Node to Traverse Deep Hierarchy... fail
-
In the attached example, I am using a Python Node to traverse a hierarchy, and although I can print the name of each child in the console, the OutputObject refuses to pass through and affect the next Object node. What am I missing here?
How do I force the object to "export" inside the while loop.
If that's not possible, what's the easiest way to do that hierarchy traversing?
CheersPython Hierarchy Node 14A.c4d -
Hi noseman. I don't quite understand. For me, you example outputs the name of all nodes, but the topmost. All objects rotate accordingly.
What do you expect to happen?edit: Ah, you probably expect the toroids to also rotate around their own axis?
-
Hi, Noseman find in the attached scene an example of how to make it work.
The main issue is Python GvNode is not designed to work as an iteration node since internally the Python Xpresso node is not registered with the GV_OPERATORFLAG_ITERATOR.To work around the issue you could expose an InExcludeData (aka list of objects for Cinema 4D user, this is what you find in the light to include or exclude light). Then process this InExcludeData with standard Xpresso tool.
Cheers,
Maxime. -
@m_adam said in Using Python Node to Traverse Deep Hierarchy... fail:
The main issue is Python GvNode is not designed to work as an iteration node
Thanks. That answers my question.
-
Ah, you probably expect the toroids to also rotate around their own axis
exactly. Thanks