Jump to content

Viewport selection -> Group parameter


Recommended Posts

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

  • 2 weeks later...

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)

   geo = pane.currentGeometrySelection()
   geoType = geo.geometryType().name()
   labels = node.parm("grouptype").menuLabels()
   items = node.parm("grouptype").menuItems()
   groupType = items[labels.index(geoType)]
   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



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.

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