riviera Posted March 1, 2010 Share Posted March 1, 2010 Hi, I'm completely new to DOP networks, so forgive the very basic question (I did look through the manuals/previous topics, though ) To put it short: what I'd need is a function to get the name of the object in a dopnet, based on its objid. What I'm trying to achieve is that I have four toruses (torii?) and four spheres (called torus_<n> and sphere_<n>), which are all rbd objects. I want to constrain them together in order that torus_0 would be pinned to sphere_0, and so on. I'm using an Apply Relationship node with an RBD Spring Constraint connected as relationship. The applyrel node is set to Number Of Relationships Per Object Pair, which seems to create the constraint between all possible combinations of objects by default. I derived from the examples that I should write an expression for the Activation parameter of the applyrel node, so it would only create a constraint where the indices extracted from the object names match. However in the applyrel node there only predefined variables are $AFFECTORID and $AFFECTEDID which return indices of the objects, and what I'd need is their names based on these indices. Any ideas? imre Quote Link to comment Share on other sites More sharing options...
graham Posted March 1, 2010 Share Posted March 1, 2010 You should be able to use something like dopobjectlist() and pass in the id as the spec argument. It should search for the id and if you give the 3rd arg as 1, return the name. Quote Link to comment Share on other sites More sharing options...
riviera Posted March 1, 2010 Author Share Posted March 1, 2010 You should be able to use something like dopobjectlist() and pass in the id as the spec argument. It should search for the id and if you give the 3rd arg as 1, return the name. Thanks a lot -- first I didn't quite get what you meant, then I realized that in DOPs the object ids and object names are kind of interchangeable. 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.