Finding cloned objects in cloned document
Joined: 2016 May 01
Online Status: Offline
Topic: Finding cloned objects in cloned document
Posted: 2017 Apr 21 at 6:19am
User Information:Cinema 4D Version: 17
Platform: Windows ;
Language(s): C++ ;
---------Hello. In order to use ExecutePasses() i am creating a dummy document and cloning the objects I'm interested in.
Here's the code for that:
Now, I'm interested in finding the clone of op in doc. In a related thread Andreas suggested using the unique ids of c4d. But how exactly do I know what is the unique id of the clone?
Perhaps there is a better, easier way?
Edited by adl architetto - 2017 Apr 21 at 6:31am
Joined: 2014 Oct 01
Online Status: Online
|Post Options Quote Reply Posted: 2017 Apr 24 at 2:48am|
not sure you need to think so complex in this case. If it's always as simple as in your above example and there's only one object (and its children) isolated into the new document, it's as simple as calling GetFirstObject() on the new document. But most likely the scenario is a bit more complicated. Then, why not give my suggestion from the other thread a try? Before isolating the object, you write your plugin ID into the object(s) BaseContainer (basically: bc->SetInt32(YOUR_PLUGIN_ID, "whatever, maybe a object index")) and afterwards you remove it again from the original object. That's probably way easier than any marker, unique ID stuff.
SDK Support Engineer
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum