On 14/09/2013 at 11:15, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15
Platform:
Language(s) : C++ ;
---------
Hi everyone,
I've been trying to update a plugin for R15, and I'm running into an issue with finding documents in Team Render. Using GetActiveDocument() worked in the old Netrender (it returned the document that was rendering), but it seems to return an empty document in Team Render.
Here's some code I've been testing with:
BaseDocument * doc = GetFirstDocument();
BaseObject * obj;
while(doc) {
GePrint("doc: " + doc->GetDocumentName().GetString());
obj = doc->GetFirstObject();
while(obj) {
GePrint(obj->GetName());
obj = obj->GetNext();
}
doc = doc->GetNext();
}
This loops through all the documents and prints their names and the top level objects in each of them. In Netrender R13 I get 'client.c4d' and a list of the scene's objects, but in Team Render I get 'Untitled 1' and no objects, regardless of the scene (and the correct scene is still rendering, but I don't know how to get to it).
Does Team Render have a different/new way to access documents?
My plugin is a FalloffData - which doesn't get a BaseDocument fed into it anywhere (except for some messages, which also don't seem to be called in the Team Render), which is why I'm using GetActiveDocument().
If anyone has any advice that'd be amazing, I'm really struggling with this one!
Thanks,
Dan