Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Delete objects?

    SDK Help
    0
    3
    304
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/08/2004 at 14:47, xxxxxxxx wrote:

        Much simpler than that 🙂

        try this:

          
        MyMenuPlugin::Execute(doc)  
        {  
        var op = GetActiveObject(doc);  
        op->Remove();          
        }  
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 15/08/2004 at 07:14, xxxxxxxx wrote:

          Yeah, thx... (searched the documentation only for "delete", so I couldn't find it)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post