node(path)
→ hou.OpNode or None
If the path starts with a /
, Houdini will look for a node with that exact
path. Otherwise, the Houdini searches relative to the current path.
See hou.pwd() for more information about Houdini’s current path. For each
occurrence of ..
in the path, Houdini will move up one node from the current
location.
Raises hou.NotAvailable if you call it from MPlay.
Be careful not to confuse this function with the class hou.OpNode.
>>> hou.node("/obj") <hou.OpNode at /obj> >>> hou.node("/obj").createNode("geo") <hou.ObjNode of type geo at /obj/geo1> >>> hou.node("/obj").createNode("geo") <hou.ObjNode of type geo at /obj/geo2> >>> hou.node("/obj/geo1") <hou.ObjNode of type geo at /obj/geo1> >>> hou.cd("/obj") >>> hou.node("geo1") <hou.ObjNode of type geo at /obj/geo1> >>> hou.cd("/obj/geo2") >>> hou.node("../geo1") <hou.ObjNode of type geo at /obj/geo1> >>> print hou.node("../geo3") None
See also |