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

    GetClone() or no GetClone()?

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 578 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

      On 18/04/2017 at 04:58, xxxxxxxx wrote:

      When I use SendModelingCommand( command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,
      I thought that I should use: list = [op.GetClone()], 
      but that does not work.
      I must use list = [op],

      So without getting a clone of the object (in this case a MoGraph Cloner)?
      Am I missing something?

      -Pim

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

        On 18/04/2017 at 08:29, xxxxxxxx wrote:

        Can be stupid but GetCLone return an obj wich is into memory but not into the document. SO have you tried to insert it before run sendmodelingcommand?

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

          On 19/04/2017 at 01:41, xxxxxxxx wrote:

          Hi Pim,

          gr4ph0s is right. The object is cloned but it has to be inserted into the document for SendModellingCommand().

          For MCOMMAND_CURRENTSTATETOOBJECT the object passed does not need to be cloned because the function returns the converted object.
          But other commands like MCOMMAND_MAKEEDITABLE change the input object so you have to decide to pass an original or a cloned object in a temporary document.

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

            On 19/04/2017 at 05:04, xxxxxxxx wrote:

            Ok, clear thanks.

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