I created a spare parm in one node, an operator path, so I can point to another node in the scene.
now that I have that and I point to this node as relative path,
../geo1/file1
with python how can I get the absolute path like /obj/geo1/file1
I try
grabbing the parm and using unexpandedString() or I thought that might be a type of .eval()
do we have a method for it?
relative path to absolute path
14676 2 1- pelos
- Member
- 621 posts
- Joined: Aug. 2008
- Offline
- graham
- Member
- 1922 posts
- Joined: Nov. 2006
- Offline
You can ask your node with the parameter on it to give you the node the parm points to, then get the path from there. hou.Node.node() will accept a relative path so you can look for the node relative to the main node.
node = hou.node(“/obj/nodewithparm”)
relPath = node.evalParm(“path”)
relNode = node.node(relPath)
fullpath = relNode.path()
node = hou.node(“/obj/nodewithparm”)
relPath = node.evalParm(“path”)
relNode = node.node(relPath)
fullpath = relNode.path()
Graham Thompson, Technical Artist @ Rockstar Games
- pelos
- Member
- 621 posts
- Joined: Aug. 2008
- Offline
-
- Quick Links