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

    KDZ Select & delete polys in SelectionTag

    SDK Help
    0
    3
    281
    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 23/07/2004 at 14:40, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.503 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Maybe I'm having a brainfart today, but I can't seem to figure out how to select the set of polygons pointed to by a SelectionTag and then delete them from the object. I'll keep plugging at it while awaiting a response.

      Thanks,
      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 25/07/2004 at 22:56, xxxxxxxx wrote:

        You could probably do it by getting the actual selection, but here's a way that doesn't reinvent the wheel:

            
            
            PolygonObject* obj = static_cast<PolygonObject*>(  
              doc->GetFirstObject());
            
            
            
            
            SelectionTag* tag = static_cast<SelectionTag*>(  
              obj->GetTag(Tpolygonselection));
            
            
            
            
            #include "../../resource/res/description/Tpolygonselection.h"
            
            
            
            
            DescriptionCommand cmd;  
            cmd.id = DescID(POLYGONSELECTIONTAG_COMMAND1);  
            tag->Message(MSG_DESCRIPTION_COMMAND, &cmd);
            
            
            
            
            ModelingCommandData mcd;  
            mcd.doc = doc;  
            mcd.op = obj;  
            mcd.mode = MODIFY_POLYGONSELECTION;  
            mcd.flags = MODELINGCOMMANDFLAG_CREATEUNDO;
            
            
            
            
            SendModelingCommand(MCOMMAND_DELETE, mcd);  
            EventAdd();
        
        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 26/07/2004 at 07:36, xxxxxxxx wrote:

          Ah ha! 🙂

          Got all the way up to using ModelingCommand, but could not figure how to actually delete the selection.

          Thanks, Mikael

          Robert

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