Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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
On 12/08/2004 at 14:47, xxxxxxxx wrote:
Much simpler than that
try this:
MyMenuPlugin::Execute(doc) { var op = GetActiveObject(doc); op->Remove(); }
On 15/08/2004 at 07:14, xxxxxxxx wrote:
Yeah, thx... (searched the documentation only for "delete", so I couldn't find it)