salik Posted November 23, 2016 Share Posted November 23, 2016 Hi all, I have just started trying to use Houdini api docs to do some scripting and was met with some issues. So, I am trying to call a ui/command where the user will be presented with a certain hierarchy and is to perform multi selections of an operator type (let's call it `customRefs`). Currently I am only able to find a command namely `hou.ui.selectNode(relative_to_node=“/obj/StackLvl”)`, however it presents me the whole hierarchy as what you would see in a typical Tree View and it only allows a single selection. Was wondering if anyone knows of any other commands that I can do multi-selections since I will need to grab the name of the selections made by user? A simple example of how the hierarchy would be: /obj/StackLvl |- /obj/StackLvl/char |- /obj/StackLvl/acc |- /obj/StackLvl/acc/item01 |- /obj/StackLvl/acc/item02 |- /obj/StackLvl/takes |- /obj/StackLvl/takes/cut01 All of them are of custom operator types. customRoot = ‘StackLvl’ customGroup = ‘char’, ‘acc’, ‘takes’ customRefs = ‘item01’, ‘item02’, ‘cut01’ Quote Link to comment Share on other sites More sharing options...
f1480187 Posted November 24, 2016 Share Posted November 24, 2016 There is node_type_filter parameter accepting one of hou.nodeTypeFilter values. hou.ui.selectNode(node_type_filter=hou.nodeTypeFilter.Sop) Quote Link to comment Share on other sites More sharing options...
salik Posted November 25, 2016 Author Share Posted November 25, 2016 23 hours ago, f1480187 said: There is node_type_filter parameter accepting one of hou.nodeTypeFilter values. hou.ui.selectNode(node_type_filter=hou.nodeTypeFilter.Sop) Yes, but unfortunately this still only allows and return 1 selection. I managed to get it over by using `selectFromTree` command instead in which I grab the path of all its child nodes of a certain hierarchy level which prompts a window populate. And it is able to present them in a tree view, the same as as in a typical tree view! Just a side question though, is it any way possible to add in additional buttons to these hou.ui window popups? For example, I would like to add a 'HELP' button that points to a web page.. 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.