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

    Create a PolygonSelection tag?

    SDK Help
    0
    8
    1.0k
    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 18/02/2003 at 09:35, xxxxxxxx wrote:

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

      ---------
      Hi,
      I'm back... 🙂
      How do you create a PolygonSelection tag for an object that includes all of its polygon (like SelectAll)?  I know that this may seem strange, but this is preparation for calling "Connect" on all of the objects - want to retain the original '.obj' groups.
      While I'm asking, why is it that when "Connect" is called on a multi-selection of objects, only two of the Texture tags are added to the new composite object?  I've tried this when only three materials (and three Texture tags) were available and when there were many more, all properly referenced.
      Thanks again,
      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 18/02/2003 at 11:31, xxxxxxxx wrote:

        Okay, I've received an answer to my second question concerning "Connect" and lack of Texture tags.
        Still not sure about creating a PolygonSelection tag.
        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 18/02/2003 at 13:20, xxxxxxxx wrote:

          Took alittle consideration and examination of references, but this works:

              
              
                
                  // Add a group-level PolygonSelection tag (for texture and to retain .obj groups when connected)  
                   ModelingCommandData cd;  
                   cd.doc = baseDoc;  
                   cd.op = object;  
                   cd.mode = MODIFY_POLYGONSELECTION;  
                   if (!SendModelingCommand(MCOMMAND_SELECTALL, cd))  
                   {  
                    GePrint(String("Select All Failed"));  
                    throw ErrorException(ERROR_RETURNFALSE, NULL);  
                   }  
                   if (!SendModelingCommand(MCOMMAND_GENERATESELECTION, cd))  
                   {  
                    GePrint(String("Set Selection Failed"));  
                    throw ErrorException(ERROR_RETURNFALSE, NULL);  
                   }  
              
          

          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 18/02/2003 at 15:40, xxxxxxxx wrote:

            oh that´s hard 🙂
            you can allocate them like any other BaseList2D member too. i.e.:
            SelectionTag* stag = SelectionTag::Alloc(Tpolygonselection);
            you can then use GetBaseSelect() that will return a BaseSelection that you can fill.

            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 17/03/2003 at 15:03, xxxxxxxx wrote:

              Okay, smarty pants, here's a question concerning the BaseSelect. ;0P
              If I want to simulate want I did in the code above (SelectALL on an object), how do I do it?  I realize that BaseSelect has a SelectAll() method, but it requires a min and max element number.  min is obvious (0), but what shall I use for max?  And, does this encompass everything selected must points, edges, or polygons be specified somewhere?
              The reason I ask is that now (it's been awhile but have had to return to this) a pointer to the SelectionTag is necessary and the SendModelingCommand() approach doesn't return one, of course.
              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 17/03/2003 at 15:42, xxxxxxxx wrote:

                hi,
                SelectAll(0,op->GetPointCount()) for example for all points. The selection takes place in the BaseSelect. If you have a point BaseSelection from i.e. op->GetPointS() it will select all points. Same for all polygons and edges.

                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 17/03/2003 at 18:50, xxxxxxxx wrote:

                  But all I have is a BaseObject, not a PolygonObject. Don't know if this matters, but the PolygonObject is derived from BaseObject (not the other way round), so I'm not certain if I even have those methods available - unless I go through 30 classes and changed BaseObject to PolygonObject...
                  So, if the objects are polygonal (loaded .obj files), will they have the PolygonObject info available by casting?
                  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 17/03/2003 at 21:39, xxxxxxxx wrote:

                    Seems to work without any problems.  See next topic. 🙂
                    Robert

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