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
    • Login

    Cloner Object in script?

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 429 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 30/09/2009 at 10:44, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;   XPRESSO  ;

      ---------
         Hello,

      I created a small script that uses the Cloner object.

      Since the command AllocObject does not allows to add a Cloner object, I create it using CallCommand

      Then I try to change the parameters of Cloner object, but my script is FAIL and Console wrote me:

      *** [FAIL] Line Cloner test script '9: Invalid identifier for the object description ***

      I understand that there is no update object attributes Cloner.

      I tested this script in 10.5, 11 and 11.5 versions
      in 10.5 works fine
      in 11 and 11,5 - FAIL

      How can I solve this problem?

      Thanks,
      Andrey

      > <code>
      > var obj = doc->GetActiveObject();
      >     obj->SetName("baseobject"); // Rename for searching
      > var nobj = doc->FindObject("baseobject"); // Find rename baseobject
      >
      > CallCommand(1018544); // create Cloner Object
      >           
      > var clone = doc->GetFirstObject(); // Select Cloner
      >     clone#ID_MG_MOTIONGENERATOR_MODE = 0; // Set mode - object
      >     clone#MG_OBJECT_LINK = nobj;   // Set Link - rename base object
      >     clone#MG_POLY_MODE_=3; // Set object mode - surface
      >     clone#MG_POLYSURFACE_COUNT = 20; // Set Count
      >     clone->SetName("myclone"); // Rename for searchig
      >     clone->Message(MSG_UPDATE);
      >     var mclone = doc->FindObject("myclone");
      >
      >     var sph = AllocObject(OSphere);
      >     doc->InsertObject(sph,mclone,null); // Insert new sphere in the cloner object
      >     sph#PRIM_SPHERE_RAD = 10;
      >     sph#PRIM_SPHERE_SUB = 12;
      >
      > </code>

      p.s. Sorry for my English. ... and this is my first post on this forum.

      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 06/10/2009 at 02:23, xxxxxxxx wrote:

        I can confirm this. I will post it as bug.

        cheers,
        Matthias

        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 07/10/2009 at 00:44, xxxxxxxx wrote:

          You have to access the cloner object's container directly to set the object link.

          > \> var bc = cloner->GetContainer(); \> \> bc->SetData(ID_MG_MOTIONGENERATOR_MODE,ID_MG_MOTIONGENERATOR_MODE_OBJECT); \> bc->SetData(MG_OBJECT_LINK,myobject); \> \> cloner->SetContainer(bc); \>

          cheers,
          Matthias

          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 07/10/2009 at 11:32, xxxxxxxx wrote:

            Many thanks for response Matthias.

            My script work fine!

            ______________
            Best Regards.
            Andrey

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