static Posted February 26, 2011 Share Posted February 26, 2011 Is there a way to access hou.Geometry() for hou.DopData() that isn't native "Geometry" subdata? I have a series of rbd box objects, and each contains a "trigger" geometry subdata (a single point that has an int attrib "active"). The plan is that when the active value switches, the object becomes active. I can access the trigger data just fine, and its data type is SIM_SopGeometry. However, I don't know how to access the point data it contains. It doesn't seem to have any hooks to a hou.Geometry() object. A hook exists for the normal "Geometry" subdata that exists for all rbd dopobjects, but I can't store my data in there... Here's a pic to simplify what I'm trying to access. Any help would be appreciated Quote Link to comment Share on other sites More sharing options...
graham Posted February 26, 2011 Share Posted February 26, 2011 (edited) There currently isn't. It took me a bit of fighting and nagging to even get the ability to get the regular geometry as geometry. Right now the best you'd be able to do is to use the soppath field on the data to look back into SOPs and retrieve the value from there. data = dopobject.findSubData("trigger") options = data.options() soppath = options.field("soppath") sopnode = hou.node(soppath) geo = sopnode.geometry() active = geo.iterPoints()[0].attribValue("active") Edited February 26, 2011 by graham Quote Link to comment Share on other sites More sharing options...
static Posted February 26, 2011 Author Share Posted February 26, 2011 There currently isn't. It took me a bit of fighting and nagging to even get the ability to get the regular geometry as geometry. Right now the best you'd be able to do is to use the soppath field on the data to look back into SOPs and retrieve the value from there. Nice suggestion. The expression was getting pretty long, so I decided to just wrap up an hscript expression in python to access the value a little more easily. hscriptExpression('point("..:%s/trigger",0,"active",0)' % expandString('$OBJNAME')) hip file attached to demonstrate. Quote Link to comment Share on other sites More sharing options...
static Posted February 26, 2011 Author Share Posted February 26, 2011 oops, hehe. activeValue.hipnc 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.