raincoleI was just wondering if there was a more direct way of doing it with Python.
node.creator(), which returns the closest parent that isn't in the same context with node.creator() → Node
Returns the first parent of different type from this node. For simple networks this will be the same as parent(), but if the parent is the same node type, eg, both are SOPs, the process is repeated until a different type is found. This is useful for finding the container node, for example, the Object that a SOP is in, without having to worry about nested SOP networks. Note that SOPs do not always have Objects as parents, however!
But honestly I'd avoid to use Python/Hscript expression as Snippet VOP's code. This kind of "metaprogramming" is bad practice in most cases.
Thank you, I didn't know about this function. Nice!
Well, as bad as it may be, and I know it can break badly with signatures, there's no other way to reference the parent HDA parameter, right? Even native nodes used backticks for that. Check Import Point Attribute VOP.
Cheers
prb