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 MoGraph Tracer using Melange

    SDK Help
    0
    5
    589
    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 08/08/2017 at 01:32, xxxxxxxx wrote:

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

      ---------
      Hello,

      Is it possible to create a MoGraph_Tracer using Melange ?

      Thank you for your help !

      Lina

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

        On 08/08/2017 at 04:22, xxxxxxxx wrote:

        // create a document
        BaseDocument* c4dDoc = BaseDocument::Alloc();
          
        // create a tracer, 1018655 is the ID of the tracer, to know it simply drag and drop a tracer object into the console
        BaseObject* myTracer = BaseObject::Alloc(1018655);
          
        // insert into the project
        c4dDoc->InsertObject(myTracer, nullptr);
        

        I'm not a melange user, then I don't really know if melange support all the mograph stuff. But if it does the code above should work 😉

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

          On 08/08/2017 at 04:32, xxxxxxxx wrote:

          Thank you very much for your reply ! It solved my problem.

          I just have a question : when I drag and drop a Tracer object in the console, I do not have the ID of the Tracer object, but just the name of it : "Tracer". What am I doing wrong ?

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

            On 09/08/2017 at 02:43, xxxxxxxx wrote:

            Hi Lina,

            you are not doing anything wrong, the name you get in the console is actually a reference to the actual object. It can be used directly as if you were in a script. For example simply press return, the referenced entity will be printed to the console (among other information also the ID). Or you can simply append .GetType() and press return to print just the ID.

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

              On 09/08/2017 at 02:47, xxxxxxxx wrote:

              Hi Andreas,

              Thank you ! Everything is easier now 🙂

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