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

    Polygonize() & CallCommand

    SDK Help
    0
    5
    476
    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

      On 07/08/2013 at 19:47, xxxxxxxx wrote:

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

      ---------
      doc->Polygonize() makes a clone, according to the SDK. If I follow this with a CallCommand(12107) and CallCommand(12108) which is Copy and Paste, which is affected? The original doc or the "clone"?

      In my SceneSaver plugin (for which I used the .stl exporter from the SDK as starter) I had originally worked with a Polygonized doc. It seems when I couldn't find another way to Copy/Paste a polygon object and used CallCommand's it didn't work - as CallCommand seems to affect the doc and not the clone. Since my exporter tests the objects intended for export it knows that they are polygons - so I took out Polygonize. Now my exporter works all the way through (creates the output file and the correct output in the console) but still crashes C4D.

      Does a SceneSaver require polygonization for some reason?

      Thanks

      Peter

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

        On 08/08/2013 at 00:13, xxxxxxxx wrote:

        The original doc, of course, since CallCommand() is equivalent to the user actually selecting that action in the C4D interface.  You should use SendModelingCommand() instead.

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

          On 08/08/2013 at 19:34, xxxxxxxx wrote:

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

            On 08/08/2013 at 19:41, xxxxxxxx wrote:

            Thanks. Of course that makes sense.
            In my situation I need to make a copy of an existing object, not change it. Couldn't find another way than CallCommand() even I feel a bit uncomfortable using it.

            It seems making a duplicate and just inserting it into the doc should be possible. But how?

            It turns out that the SceneSaver does apparently need a Polygonized doc.

            Peter

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

              On 08/08/2013 at 21:20, xxxxxxxx wrote:

              To copy something, use the GetClone() method of the object.

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