Home Website Youtube GitHub

Can't get component root in post custom step

Whenever I try to get the root of a shifter component (ex: self.component(“control_C0”).root), I end up getting the full path name because it’s the same name as the root node of the module’s guide template. Python doesn’t seem to like it when I try to reference full name spaces, so how can I fix this?

Instead, reference a unique node. Try this instead:

What does “Python doesn’t seem to like it” mean? :slight_smile: Show exactly what code you’re using, or errors you’re getting. You can definitely use long names to get nodes too.

Oh, I didn’t know “.getParent” was a thing you could do! I always used pm.listRelatives(theControl, p=1), but this feels much more intuitive. The rigbits.addNPO solution also worked for me. Thank you for the help!

1 Like