yongbin Posted November 13, 2013 Share Posted November 13, 2013 Hi, I want mimic "constraint" and "apply relationship" nodes with python. But hou.DopObject.createSubData("Somename", data_type="SIM_Relationship") didn't work for me. I putted several other types but only default value "SIM_EmptyData" made it work. So, Relationship isn't a data? How can I attach it from python? Thank you Quote Link to comment Share on other sites More sharing options...
DanBode Posted November 14, 2013 Share Posted November 14, 2013 So, Relationship isn't a data? Nope! Well not exactly. Relationships are a special type of data, and need to be treated a little differently. But you can still add them in python. To create relationships in python you need to use hou.DopSimulation.createRelationship() which returns a hou.DopRelationship object. Then you use hou.DopRelationship.setGroup() and hou.DopRelationship.setAffectorGroup() to set what objects the relationship affects. 1 Quote Link to comment Share on other sites More sharing options...
yongbin Posted November 14, 2013 Author Share Posted November 14, 2013 Thank you, DanBode. This is exactly what I looking for 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.