asnowcappedromance Posted November 14, 2011 Share Posted November 14, 2011 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 Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 14, 2011 Share Posted November 14, 2011 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 Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted November 14, 2011 Author Share Posted November 14, 2011 oh, thanks for mentionning this, I tend to forget that sometimes, it's always so easy to grab a parameter with dragging it from the parameter pane into the Python shell glad you like it! Manu Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 14, 2011 Share Posted November 14, 2011 you could also add random color per group as separate toggle Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted November 14, 2011 Author Share Posted November 14, 2011 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 Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 15, 2011 Share Posted November 15, 2011 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) 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.