THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/11/2005 at 23:10, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9
Platform: Windows ;
Language(s) : C++ ;
---------
Hello ...
I want to create an Object plugin like the sameple "RoundTube" ...
But how do I have to handle the PolygonObject ...?
Is there a place or any forum links to know more about the Object plugin ...
I coded like that ... but it always make the program (C4D) crash ...
static BaseObject *GenerateMyObj(BaseThread *bt)
{
LONG i;
PolygonObject *ret = NULL;
ret=PolygonObject::Alloc(1,4);
Vector *vRet=ret->GetPoint();
struct CPolygon *pRet=ret->GetPolygon();
if(bt&&bt-;>TestBreak())
{
return NULL;
}
vRet[0]=Vector(0,-100,100);
vRet[1]=Vector(0,-100,-100);
vRet[2]=Vector(0,100,-100);
vRet[3]=Vector(0,100,100);
pRet[0]=CPolygon(0,1,2,3);
ret->Message(MSG_UPDATE);
return ret;
}
BaseObject *MyOBbj::GetVirtualObjects(PluginObject *op, HierarchyHelp *hh)
{
BaseObject *ret=NULL;
Bool dirty = op->CheckCache(hh) || op->IsDirty(DIRTY_DATA);
if (!dirty) return op->GetCache(hh);
if (hh->GetVFlags()&VFLAG;_POLYGONAL)
{
ret = GenerateMyObj(hh->GetThread());
if (!ret) goto Error;
}
else
{
ret = PolygonObject::Alloc(0,0);
if (!ret) goto Error;
}
ret->SetName(op->GetName());
return ret;
Error:
return NULL;
}
Is there any information that you can tell me? At least what I need to study more to make an Object plugin.
Thanks in advance ...
ZawMinTun