junaid Posted September 30, 2014 Share Posted September 30, 2014 Hi There, is there a way i can grab path for selected node in hscript? similar to hou.Node.path(hou.selectedNodes()[0]) in python. I know i can do in python with hou.hscript("opinfo -v "/obj/geo1/spehere1" ") but then again the problem is how will i use python in hou.hscript command. selected = hou.Node.path(hou.selectedNodes()[0]) hou.hscript("opinfo -v selected") Thanks, Junaid Quote Link to comment Share on other sites More sharing options...
junaid Posted September 30, 2014 Author Share Posted September 30, 2014 (edited) okay found it, here how i can get info selected info with python, I was wondering does anybody knows how to do the same with hscript? Since hscript out info bit more cleaner python script selected = hou.Node.path(hou.selectedNodes()[0]) info = hou.hscript("opinfo -v '%s' " % selected) print info Edited September 30, 2014 by junaid Quote Link to comment Share on other sites More sharing options...
edward Posted October 2, 2014 Share Posted October 2, 2014 selected = hou.selectedNodes()[0].path() Quote Link to comment Share on other sites More sharing options...
junaid Posted October 2, 2014 Author Share Posted October 2, 2014 ahh cool, but does the same as the one i mention, I was wondering is there a similar function in Hscript? Cheers, Junaid 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.