THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/08/2004 at 14:34, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 6.303
Platform:
Language(s) : C.O.F.F.E.E ;
---------
Hi,
how can i delete objects with coffee?
I tried it like this, but it didn't work:
//register plugin
class MyMenuPlugin : MenuPlugin
{
public:
MyMenuPlugin();
GetID();
GetName();
GetHelp();
Execute(doc);
}
MyMenuPlugin::MyMenuPlugin()
{
super();
}
MyMenuPlugin::GetID()
{
return 12345678;//Dummy for demonstration
}
MyMenuPlugin::GetName()
{
return "TestPlugin";
}
MyMenuPlugin::GetHelp()
{
return "Delete Object";
}
MyMenuPlugin::Execute(doc)
{
var myCnt = new(BaseContainer);
if (GetActiveObject(doc) == NULL)
return (!TextDialog("Please select an object first!", DLG_OK + DLG_ICONSTOP));
SendModelingCommand(MCOMMAND_DELETE, doc,
GetActiveObject(doc), myCnt, MODIFY_ALL);
}
main()
{
Register(MyMenuPlugin);
}
thx
Robert