Accessing interface colors [SOLVED]

On 29/04/2015 at 18:24, xxxxxxxx wrote:

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


I have a custom dialog loaded from external library (ie not GeDialog). The appearance of this dialog can be customized before it is created and I want it to look like the rest of C4D interface. But because colors of controls in C4D can be customized via preferences, I cannot simply use hardcoded colors but I should read colors from C4D preferences.

I searched docs and found function GetGuiWorldColor which seems to do exactly what I want, but unfortunatelly it is not documented and marked as private. I tried to call it with some IDs and managed to match the colors from preferences with numbers I can pass to GetGuiWorldColor, but I want to ask few thing before using it:

1. Is it safe to use GetGuiWorldColor? I tried it in R15 and R16 and it worked without any problem, but since it is marked as private in docs, will it work for example after update, or in R17? And can I assume the ID matching for example "General - Text" color will match the same color in other versions of C4D?
Note that I want my plugin to work in R14, R15, R16 (and R17 when it comes out).

2. Is it possible to add some options to listview in Preferences/Scheme Colors/Interface Colors?

On 30/04/2015 at 09:19, xxxxxxxx wrote:


I checked back with the devs:
You can use GetGuiWorldColor().
And although I can't promise the IDs will work for all times, they are supposed to deliver the same colors (in the sense of color is used for the same thing) in all versions.
We will add the documentation of GetGuiWorldColor() in the near future.

For your second question, I unfortunately have to say, it is not possible.