検索 - User list
Full Version: Parent object relative path
Root » Technical Discussion » Parent object relative path
Chirimoya
Hello everybody,

Is there a way to get a relative path to the parent of an object. By parent, I do not mean the parent “network container”. I mean the node connected to Input 0.

For example, inside a CHOP Network, which is inside an SOP, I have an Object node. I want the Reference Object parm to point to the SOP object's parent.
Let's say the parent name is “Null”. The relative path is “../../../Null”. However, I do not want to hardcode “Null”. I would like this to be dynamic.

Is there a way to do this?

Thanks in advance
jlait
I think this is what you want?

`opinputpath(“../../..”, 0)`
tamte
so let's say your hierarchy is
/obj/GeoObject/chopnet/ObjectCHOP

to get Object connected to first input of GeoObject from ObjectCHOP's targetpath parm you will type:

`opinputpath(“../..”, 0)`

it will simply get first input node of the node 2 levels above the ObjectCHOP, which is first input of GeoObject node

EDIT: too slow
Chirimoya
awesome, thanks guys
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB