Node parenting inconsistency

Hi,

Network parenting does not seem to work with python methods.

Example: inside /Project1, “a” COMP is the parent of “b” COMP parented to each other via top and bottom connectors:

One can get the parent hierarchy in tscript, but not in python which ignores the direct parenting of containers.

Hey

If anyone else ends up here with the same question, you can use the following snippet:

me.inputCOMPConnectors[0].connections[0].owner

Josh

Hi,

yup, not a bug just a more concise way of working in hierarchies.

If we would follow the logic of tscripts opparent then referencing a node with the path /project1/a/wave1 from inside /project1/b could be done via …/wave1
Of course that is wrong. The problem was that opparent treated panel hierarchies the same as network hierarchies.

Now it’s more clear:

# a is a special input to b, so you can reference it with:
a = op('b').inputCOMPs[0]

# the parent of b can be fetched with the parent method:
p = op('b').parent()

# and of course that works with levels:
pp = op('b').parent(2)

Hope this helps
Cheers
Markus