THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/11/2010 at 12:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: r11
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
i am trying to figure out how to bevel but i cant get it to work. its simply crashing...
this is some test code with which i am trying to figure it out.
BaseObject *test::GetVirtualObjects(PluginObject *op, HierarchyHelp *hh)
{
BaseDocument* doc = op->GetDocument();
BaseObject* tempObj = BaseObject::Alloc(Ocube);
ModelingCommandData cd;
BaseContainer* mbc = NULL;
cd.doc = doc;
cd.op = tempObj;
if (SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, cd))
{
blDelete(tempObj);
tempObj = static_cast<BaseObject*>(cd.result->GetIndex(0));
tempObj->InsertUnderLast(main);
}
///until here it works
cd.op = tempObj;
mbc->SetParameter(MDATA_BEVEL_OFFSET2,GeData(1.0)); //crashes if this line is in
if (SendModelingCommand(450000005, cd))
{
GePrint("done");
}
return main;
}
any help would be cool
cheers,
ello