On 04/02/2015 at 01:45, xxxxxxxx wrote:
Cinema 4D Version: 14,15,16
Language(s) : C++ ;
I am trying to create a (hidden) cloner object so I can use its surface distribution properties, like retrieving global positions and normals of individual clones.
However, I am getting stuck at the very beginning.
Here is some code:
BaseDocument* doc = node->GetDocument(); BaseObject *clonerObj = BaseObject::Alloc(1018544); // Create a cloner object if (!clonerObj) return true; BaseTag *tag = clonerObj->GetTag(ID_MOTAGDATA); if (!tag) return true; // The tag is not found so the rest is not executed GetMoDataMessage msg_data; tag->Message(MSG_GET_MODATA, &msg_data); LONG clCount = msg_data.modata->GetCount(); GePrint(LongToString(clCount ));
The only situation that I got working is to search for a cloner object from the scene, but I want to create my own cloner and hide it from the user (if possible).
I tried inserting the cloner into the document and even inserting an object under the cloner, the tag is still not found unless done manually and not programamtically.
Any help would be greatly appreciated.