THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/10/2006 at 03:35, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.5
Platform: Windows ;
Language(s) : C++ ;
---------
Hello,
I have a Menu-Plugin that is supposed to create a new object and then insert my own tag to that object. But when I run it, it closes C4D without any message whatsoever. Here's my code for the Menu-Plugin Execute:
Bool GenStation::Execute(BaseDocument *doc)
{
BaseObject *op = BaseObject::Alloc(Onull);
op->SetName("S/C");
doc->InsertObject(op,doc->GetActiveObject(),NULL,TRUE);
BaseTag *StationTag = (BaseTag* )TagStation::Alloc();
op->InsertTag(StationTag);
EventAdd();
return TRUE;
}
If I take out the line
op->InsertTag(StationTag)
, then everything works fine, but obviously I don't have the tag on my object then ... any ideas?
cheers, Juergen