Chaos Corona for Cinema 4D > [C4D] I need help!

How to use python code in the corona .h files


Hi there,

Got a quick question, in the plugin directory=>corona=>res=>description=> are a lot of .h files that contain useful synstaxes.

Let's say that from the "prefscorona.h" I'd want to use the synstax "PREF_CORONA_CORE_VERSION".

How do I actually write that in code in the script editor to use it?

c4d[PREF_CORONA_CORE_VERSION] doesn't work
c4d.[PREF_CORONA_CORE_VERSION] doesn't work

Normally I would use these kinds of syntaxes on an actual object, so on for instance a corona light object to get the intensity.
But for the life of me I don't know on what kind of object to apply this syntax.....



the data container storing all Corona preferences can be retrieved from main C4D settings container under ID 1030480 - this ID is currently not visible in the .h files in plugin folders, but we'll try adding it in the future so that you wouldn't need to hardcode its value.

An example for reading PREF_CORONA_CORE_VERSION you mentioned would be:

--- Code: ---coronaPreferences = c4d.GetWorldContainerInstance()[1030480]

--- End code ---

Aaaaah, thanks a million!

Yeah it would be nice if it was clearer how to use some of these. As I said it's quite obvious with lights and materials but stuff like this is a bit more......technical....


[0] Message Index

Go to full version