Ticktock Posted September 19, 2020 Share Posted September 19, 2020 (edited) With almost every modelling node in Houdini we are able to select primitives, points etc in the viewport......tab menu select the required node and the selection of primitive numbers for example is in the group field parameter. How is this same functionality achieved with assets? Thank you. Edited September 19, 2020 by Ticktock Quote Link to comment Share on other sites More sharing options...
Sustaxata Posted October 3, 2020 Share Posted October 3, 2020 I managed to get this working through an onCreated script. The official way of using shelftool scripting resulted in errors that I wasnt able to debug (also documentation is pretty bad for this) my oncreated code: import stateutils import hou node = kwargs['node'] pane = stateutils.activePane(kwargs) try: geo = pane.currentGeometrySelection() geoType = geo.geometryType().name() labels = node.parm("grouptype").menuLabels() items = node.parm("grouptype").menuItems() groupType = items[labels.index(geoType)] node.parm("grouptype").set(groupType) node.parm("group").set(geo.selectionStrings()[0]) except: print "creating standard node" There may be a typo in there, but i think this should be fine. Of course you need to adjust the parameter names if yours are different Cheers, Carlos 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.