conwiz3304 Posted February 20, 2018 Share Posted February 20, 2018 Hi big friends, i have a little question for you it about python function 'hou.node.children()' that's returning always like this (<hou.SopNode of type sphere at /obj/geo1/subnet1/sphere1>,..) it's seems like used absolute path for searching node look to me... wonder how get relative path node not used absolute path. like (<hou.SopNode of type sphere at ./subnet1/sphere1.>,..) (when if current node is '/obj/geo1') have a any idea? Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 20, 2018 Share Posted February 20, 2018 Does it cause problems? It is for display. There is no relative or absolute nodes in HOM, as far as I know. Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted February 20, 2018 Share Posted February 20, 2018 (edited) 6 hours ago, conwiz3304 said: that's returning always like this (<hou.SopNode of type sphere at /obj/geo1/subnet1/sphere1>,..) it's seems like used absolute path for searching node look to me... If you print an object in Python it'll show human readable text describing the object. The text you see isn't comprehensive and the data of the object often isn't human readable. There are lots of things you can do with the object. See the Houdini documentation for more details. Reference for the hou module - http://www.sidefx.com/docs/houdini/hom/hou/index.html Reference for hou.Node - http://www.sidefx.com/docs/houdini/hom/hou/Node.html You probably want the relativePathTo method shown on the hou.Node reference page. If you're new to Python and/or object oriented programming I suggest checking out more generic Python training material along with these Houdini references. Edited February 20, 2018 by lukeiamyourfather Quote Link to comment Share on other sites More sharing options...
conwiz3304 Posted February 21, 2018 Author Share Posted February 21, 2018 9 hours ago, lukeiamyourfather said: If you print an object in Python it'll show human readable text describing the object. The text you see isn't comprehensive and the data of the object often isn't human readable. There are lots of things you can do with the object. See the Houdini documentation for more details. Reference for the hou module - http://www.sidefx.com/docs/houdini/hom/hou/index.html Reference for hou.Node - http://www.sidefx.com/docs/houdini/hom/hou/Node.html You probably want the relativePathTo method shown on the hou.Node reference page. If you're new to Python and/or object oriented programming I suggest checking out more generic Python training material along with these Houdini references. thx for your reply before the discussion, i'm not well eng. but i understand your answer. relativePathTo, it just extracting string path of node by node... my question means the way searching nodes function. i research the way about python working process in block box and testing for simply. in more then deep blackbox level, pwd or node('.') or node('./[node]') are access working. can access node, parms, set value, anythings but, searching node function(children, parent, etc...) was blocked by permission error. even using accessed node. as i think, pwd or node('./[node]') can accessing node by relative path, but children or parent function has accessing by only absolute path. because blockbox is blocked of outside accessed. but, inside the blockbox was accessed worked. (like a shell) wonder how i accessing children nodes function using by relative path in blockbox? Quote Link to comment Share on other sites More sharing options...
conwiz3304 Posted February 21, 2018 Author Share Posted February 21, 2018 16 hours ago, f1480187 said: Does it cause problems? It is for display. There is no relative or absolute nodes in HOM, as far as I know. thx to reply Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.