On 08/06/2014 at 18:53, xxxxxxxx wrote:
Ok, here is my code:
#include "c4d.h"
#include "c4d_symbols.h"
#define ID_POLYPAINTEDITOR 1234567
class polypainteditor : public NodeData
{
public:
virtual Bool DisplayControl(BaseDocument* doc, BaseObject* op, BaseObject* chainstart, BaseDraw* bd, BaseDrawHelp* bh, ControlDisplayStruct& cds);
virtual Bool InitDisplayControl(BaseDocument *doc, BaseContainer &data;, BaseDraw *bd, const AtomArray *active);
virtual void FreeDisplayControl();
static NodeData * Alloc(void) { return gNew polypainteditor; }
};
Bool polypainteditor::InitDisplayControl(BaseDocument *doc, BaseContainer &data;, BaseDraw *bd, const AtomArray *active)
{
return true;
}
void polypainteditor::FreeDisplayControl()
{
}
Bool polypainteditor::DisplayControl(BaseDocument *doc, BaseObject *op, BaseObject *chainstart, BaseDraw *bd, BaseDrawHelp *bh, ControlDisplayStruct &cds;)
{
return true;
}
// ***************************************************************
// register the plugin
// be sure to use a unique ID obtained from www.plugincafe.com
Bool Registerpolypainteditor(void)
{
return RegisterSceneHookPlugin(ID_POLYPAINTEDITOR, "PolyPaintEditor",PLUGINFLAG_HIDE|PLUGINFLAG_HIDEPLUGINMENU|PLUGINFLAG_SCENEHOOK_NOTDRAGGABLE,polypainteditor::Alloc,EXECUTIONPRIORITY_EXPRESSION,0);
}
Even this simple code (that does nothing), crashes my Cinema4D as soon as it finishes loading.
What could be wrong?