Jump to content

DisplayGroupNames Otl


asnowcappedromance

Recommended Posts

Hey guys,

I wrote a Python Operator that creates a string attribute for incoming point/prim groups and addds

the associated display options. Also it supports multiple groups on a point/primitive.

Feel free to give it a shot, I find it very helpful, feedback appreciated!

regards,

Manuel

SOP_displayGroupName.otl

Link to comment
Share on other sites

hey, nice tool, thanks for sharing :)

one thing - you have hardcoded your evalParm assigments

instead using:

toggle = hou.parm('/obj/box_object1/groupName1/displayme')

mode = hou.evalParm('/obj/box_object1/groupName1/mode')

use:

mode = hou.pwd().evalParm('mode')

toggle = hou.pwd().evalParm('displayme')

and will work fine :)

Link to comment
Share on other sites

Good idea!

Would require to restructure the code though, right now the groups are stored in one attribute string, I'd have to split them up (one variable per group). Don't know

if you want to end up with like 10 attributes if you got a heavy scene, you would also have to create 10 options in the viewport display options, kind of messy.

A question: I renamed the otl to "displayGroupNames" after I created it, but everytime I throw a new node in the network editor it names the operator "groupName1".

Couldn't figure out where to change this, anybody knows how to do that?

Anyway, updated otl is attached! (paths are no longer hardcoded.)

Manu

SOP_displayGroupName.otl

Link to comment
Share on other sites

Good idea!

Would require to restructure the code though, right now the groups are stored in one attribute string, I'd have to split them up (one variable per group). Don't know

if you want to end up with like 10 attributes if you got a heavy scene, you would also have to create 10 options in the viewport display options, kind of messy.

You could just setAttrib Cd randomly (if exists or create one if not) based on random.seed(g) (your group name)

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