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

    Object IDS [SOLVED]

    SDK Help
    0
    6
    425
    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 13/10/2015 at 00:58, xxxxxxxx wrote:

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

      ---------
      Hello.

      Where can i find the IDS of all nodes ?
      I can see that Ocube has an ID of 5159 which is defined in ge_prepass.h
      But i can't find where the mographs are defined.

      Thank you.

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

        On 13/10/2015 at 01:29, xxxxxxxx wrote:

        Hello,

        there is no central file in the API that hosts all IDs of everything. MoGraph for example is a separate module that has it own header files etc.

        A central place for IDs is the "Customize Commands" dialog. It contains the commands used to create objects. These commands have the same ID as the created object. So for example the ID of the MoGraph cloner is 1018544.

        You can also find out the ID of a given node by creating that node and using GetType().

        Best wishes,
        Sebastian

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

          On 13/10/2015 at 01:57, xxxxxxxx wrote:

          In this dialog i can find what i need.
          Thank you very much.

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

            On 14/10/2015 at 20:25, xxxxxxxx wrote:

            You might find my description site useful, it doesn't have the ID numbers but it does show the define you use to allocate the node, but I may add the ID number soon as well.

            As an example the Mograph Cloner can be found here...

            http://dev.gamelogicdesign.com/Description/Node?containerName=Omograph_cloner

            And it shows near the bottom how to create it via C++ and Python like so

              
            #include "../mograph/description/omograph_cloner.h"   
              
            void SampleFunction()   
            {   
                BaseDocument *pDoc = GetActiveDocument();   
                BaseObject *pObject = BaseObject::Alloc(Omograph_cloner);   
                pDoc->InsertObject(pObject);   
                pDoc->StartUndo();   
                pDoc->AddUndo(UNDO_NEW,pObject);   
                pDoc->EndUndo();   
                EventAdd(EVENT_FORCEREDRAW);   
            }   
            

            You can search the description page for "mograph" to find the other objects.

            http://dev.gamelogicdesign.com/Description/NodesByType

            Might also be nice if I organised them via module type as well. Maybe at some point.

            Hope this helps,
            bar

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

              On 14/10/2015 at 23:37, xxxxxxxx wrote:

              Thank you very much Kbar !
              I will use it !

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

                On 30/10/2015 at 07:00, xxxxxxxx wrote:

                Hi Peterakos,

                What you can do in most situations, is drag the object/parameter to the console link field (command line) and press enter. As long as the Console is set to python, you mostly get useful information!

                You can mark this as Solved.

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