Jump to content

opinfo for selected node in hscript


junaid

Recommended Posts

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

Link to comment
Share on other sites

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 by junaid
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...