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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Delete object's polygons via SelectionTag

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 558 Views
    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 Offline
      Helper
      last edited by

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

      On 02/08/2005 at 17:32, xxxxxxxx wrote:

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

      ---------
      How would you go about deleting polygons from a PolygonObject using SelectionTags? I know to get the object's Polygon array and to use BaseSelect to get the selected indices of the polygons.

      Now, how do you remove them from the Polygon array similarly to using the Delete key on a selected set of polygons in the editor?

      Thanks,

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

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

        On 02/08/2005 at 18:58, xxxxxxxx wrote:

        I should add that the deletion of polygons is on the cloned object from within GetVirtualObjects in a Generator PluginObject. Can SendModelingCommand() be used in this instance?

        Thanks,

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

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

          On 03/08/2005 at 02:55, xxxxxxxx wrote:

          Yes, thats how you call modeling commands 🙂 just call with MCOMMAND_DELETE.

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

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

            On 03/08/2005 at 12:17, xxxxxxxx wrote:

            One more question on my generator plugin:

            The PolygonObject is loaded, the Generator object created and inserted into the document, and the PolygonObject made a child of the Generator. The PolygonObject doesn't show until the Generator is selected in the OM. I've tried Message(MSG_UPDATE), EventAdd(EVENT_FORCEREDRAW) is already called for the entire process, EventAdd() on the Generator, other forms of Message(). What is needed to get the Generator to 'boot up' here?

            Thanks,

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

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

              On 03/08/2005 at 13:28, xxxxxxxx wrote:

              Best thing you can do is to take a look over the SDK examples and pull apart the generators, they're all really simple so it shouldn't take many minutes to work out which bit of the code is missing. At the very basic form just returning a polygon object from the GetVirtualObjects should show it up, work back from that.

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

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

                On 03/08/2005 at 13:52, xxxxxxxx wrote:

                The Generator itself works. What appears to be happening is since the Generator is InsertObject()d into the Document and the PolygonObject afterwards as child, but the Generator is doing the GetDDescription() beforehand (Which is used to build a list of 'body part visibility' checkboxes from the PolygonSelection tags on the PolygonObject. The checkbox settings are used in GetVirtualObjects() to determine what is visible or not) and there is nothing there yet.

                It could return the clone, but that isn't good for later (slows things down when nothing needs to be done) and isn't correct (nothing invisible). It returns the cache as it should but there is no cache yet (thus, no object in the editor). This is because it needs to do another GetDDescription() to do GetVirtualObjects() properly. But I cannot find any way to prod another call to GetDDescription() in my source. SetDirty() and Touch() don't work. SetDeformMode() to FALSE then TRUE doesn't work. Removing and reinserting the Generator (with PolygonObject already as child) into the Document doesn't work. There are no messages sent to the Generator (even when I click on the Generator which does cause GetDDescription() to get called).

                All that I need is a way to kick the Generator from the source, "Hey, do the GetDDescription() just one more time, please."

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

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

                  On 03/08/2005 at 17:21, xxxxxxxx wrote:

                  Well, it seems that the best approach is to call BaseDocument->SetActiveObject(GeneratorObject, SELECTION_ADD). This guarantees that all of the GeneratorObjects get booted properly (SELECTION_NEW only boots the last one set active). These are the differences between making plugin objects that users add and remove interactively and those that are created, added, removed, and set programmatically. Different worlds.

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