MENOZ Posted July 22, 2016 Share Posted July 22, 2016 Hello, I can't find a way to get a list of selected stiky notes with python. Is there a special command for this? Thank you! Quote Link to comment Share on other sites More sharing options...
Atom Posted July 22, 2016 Share Posted July 22, 2016 http://www.sidefx.com/docs/houdini15.0/hom/hou/StickyNote Quote Link to comment Share on other sites More sharing options...
MENOZ Posted July 22, 2016 Author Share Posted July 22, 2016 hey, I've already read that page, still I can't get the selected sticky note. am I missing something obvious? Quote Link to comment Share on other sites More sharing options...
Atom Posted July 22, 2016 Share Posted July 22, 2016 (edited) 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 July 22, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
MENOZ Posted July 22, 2016 Author Share Posted July 22, 2016 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() Quote Link to comment Share on other sites More sharing options...
Atom Posted July 22, 2016 Share Posted July 22, 2016 Correct, but you do target the network when you supply the path. If you are just looking in DOPs then... n = hou.node("/obj/AutoDOPNetwork1") Quote Link to comment Share on other sites More sharing options...
MENOZ Posted July 22, 2016 Author Share Posted July 22, 2016 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. 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.