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

    Accessing interface colors [SOLVED]

    SDK Help
    0
    2
    208
    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 29/04/2015 at 18:24, xxxxxxxx wrote:

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

      ---------
      Hi,

      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?

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

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

        Hi,

        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.

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