Jump to content

Get selected sicky notes Hou


MENOZ

Recommended Posts

Yeah, I think once you have a stickynote variable all you have to do is evaluate the isPicked() function. If true that stickynote is selected.

 

n = hou.node("/obj/")
for my_stickynote in n.stickyNotes():
    print my_stickynote.isPicked()

 

 

Edited by Atom
Link to comment
Share on other sites

this means I would need to look everywhere for sticky notes, then loop over them and check which one is selected.

I would expect the selection is stored somewhere in memory and there should be a wasy way to get it, I guess this is what happens with the hou.selectedNodes() 

 

Link to comment
Share on other sites

If i have to supply the path eveythime I loose the benefit of using the script, I could just write every t youknime the note directly. Thanks for the help anyway

I could get the mouse position and get the path of where it is in the network view, but not always I can have my mouse where i want it to be. I think there should be a way to get the current selection.

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...