SOLVED Ability to Drag Nodes to the Console?

Hi,

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

Regards,
Ben

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

@ferdinand

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

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

@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.

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

@ferdinand

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