Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Ability to Drag Nodes to the Console?

    General Talk
    r25 python
    2
    7
    1.0k
    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.
    • B
      bentraje
      last edited by

      Hi,

      Is there a way to drag nodes to the console like all other objects in C4D?
      For debugging purposes.

      Regards,
      Ben

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @bentraje
        last edited by ferdinand

        Hello @bentraje,

        Thank you for reaching out to us. No, nodes debugging is working differently, because they are based on the maxon API and not the classic API. So, the description workflow you are used to from the classic API does not apply here anymore.

        The sort of equivalent is enabling the IDs option in the node settings. With it you can discover node and port IDs.

        27f4e415-aa2d-45ab-b6ba-0349ea7f0359-image.png

        6b8312dd-2afc-40ab-b4da-4210ab158bbb-image.png

        It will then display the asset ID, the ID to load a node template with, and the node ID, the ID to address a specific node in a specific graph with, in the Info Field of the Node Editor. Right click an element to copy and paste it.

        The same workflow applies to ports and ports within port bundles, you must then simply select what you are interested in:

        e6ec0933-075d-4fbb-a9f5-3ceee41ca2ca-image.png

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        B 1 Reply Last reply Reply Quote 0
        • B
          bentraje @ferdinand
          last edited by

          @ferdinand

          Thanks for the response.
          I don't see the id section on the node editor.
          Is this because I'm on R25?

          ferdinandF 1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand @bentraje
            last edited by

            Hey @bentraje,

            My apologies, I overlooked the version tag. The GUI settings for the Nodes Editor are an S26+ feature. For older versions you will have to start Cinema 4D with the command line argument g_showNodeIds=true. So, for Windows, you could for example modify your shortcut as such:

            368e5cb8-4237-47e6-9b31-602876880025-image.png

            I.e., the full 'Target' path is then "C:\Program Files\Maxon\R25SP1\Cinema 4D.exe" g_showNodeIds=true

            The in app-experience is then almost identical, the node and node template asset IDs will be shown in the info area of selected nodes and clicking a line will allow you to copy and paste it. The major difference of the Info Area in later versions is that you can resize it, in R25 it always has a fixed size.

            4737c145-a26e-460d-913c-fcbfff4204f8-image.png

            Cheers,
            Ferdinand

            MAXON SDK Specialist
            developers.maxon.net

            B 1 Reply Last reply Reply Quote 0
            • B
              bentraje @ferdinand
              last edited by

              @ferdinand said in Ability to Drag Nodes to the Console?:

              g_showNodeIds

              No worries. Thanks for the clarification and the illustration images. Helps a lot.

              A bit off topic where do you find these arguments g_showNodeIds=true
              Just curious what are the other arguments.

              I tried the following
              C:\Program Files\Maxon Cinema 4D R25\Cinema 4D.exe" --help
              C:\Program Files\Maxon Cinema 4D R25\Cinema 4D.exe" -help

              But it doesn't give any output. Nor does it error out.

              ferdinandF 1 Reply Last reply Reply Quote 0
              • ferdinandF
                ferdinand @bentraje
                last edited by ferdinand

                Hello @bentraje,

                There are literally hundreds of command line arguments in Cinema 4D and most of them are either non-public or semi-public, i.e., we hand them out only to selected developers. It is only in the very recent past that our developers started to have make use of them in a more public fashion.

                Which is why there is no -help argument, as the average user is simply not intended to see them all. (Note: There is formally a -help argument, but it is currently omitted on startup, as Cinema 4D automatically adds an argument to its argument list, which tells the system to ignore -help). I also cannot give you our internal documentation, as it contains arguments which are not public, or more specifically we are not so sure yet ourselves which one we want to publicize and which one not, as in the past (almost) all arguments were considered non-public by default.

                However, we have it on our agenda to produce at least a shortened list, but it is something which will take a bit of time. Most arguments are also very context specific. So, it would be probably best if the commands were presented in the relevant context. You can have a look at the Asset API documentation in C++ where I already did this. To list a few more generic ones:

                • -g_console: Starts Cinema 4D with the dev console. Is mostly useful for C++ stuff.
                • -debug: Enables the debug logger, mostly useful in conjunction with g_console, and more of a C++ thing.
                • -g_enableDebugBreak: Setting this to g_enableDebugBreak=false will allow you to step over debug breaks. This is again a pure C++ thing.
                • g_additionalModulePath: Allows you to define additional module paths which can be useful for development, e.g., "Cinema 4D.exe" -g_additionalModulePath=D:\development\myCurrentProject will allow you to load all plugins in D:\development\myCurrentProject without having to modify the preferences of that Cinema 4D installation.
                • g_encryptPypFile: Allows you to encrypt Python files from the terminal, the subject has been discussed relatively recently here.

                Long story short: Most debug arguments are a C++ thing, with some more recent exceptions around the Nodes and Asset API, where they can also be helpful in Python.

                Cheers,
                Ferdinand

                MAXON SDK Specialist
                developers.maxon.net

                B 1 Reply Last reply Reply Quote 1
                • B
                  bentraje @ferdinand
                  last edited by

                  @ferdinand

                  Gotcha. Thanks for the clarification.
                  Will close this thread now.

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