On 09/11/2014 at 05:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
---------
Hi Folks,
I've got the following code in an ObjectData plugin's function that runs on the click of a command, to open a dialog window:
BaseObject *obj = (BaseObject* )this;
BaseDocument *doc = (BaseDocument* )obj->GetDocument();
if(doc == NULL)
{
GePrint("Object is passing a NULL doc..");
return FALSE;
}
dlg.SetDocument(doc); // custom dialog function
return dlg.Open(...);
The object is in the scene, it's in the AM, I can go through it's tabs etc. But the document is always returning null. What am I missing here?
WP.