Colors from c4d_colors



  • On 18/09/2013 at 18:55, xxxxxxxx wrote:

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

    ---------
    Hi Folks,

    in an effort to try and keep some of my draws consitant with the interface colours, I'm trying to use some of the default colours in my GeUserArea draw. But while the SDK docs show that COLOR_OBJECTMANAGER_TEXT is available, the header file shows it as EX_COLOR_OBJECTMANAGER_TEXT which leads to an undefined identifier compile error.

    I notice there's a VIEWCOLOR_ in the docs - does this having anything to do with the interface colours I'm after?

    What's the equivalent colour code to use here then? I can't find any 'replaced with' or 'now use' notes in the docs.

    Regards,

    WP.

    EDIT 1: update to topic title.
    EDIT 2: btw - I'm aware of what the undefined error itself is and why =)



  • On 19/09/2013 at 08:42, xxxxxxxx wrote:

    It looks like the docs are not up to date concerning the color names changes.
    The names prefixed with EX_ should work.
    You can also use the VIEWCOLOR_ too if you want. They come from the ge_prepass.h file.

    But EX_COLOR_OBJECTMANAGER_TEXT should not be throwing an undefined error.
    In your C++ solution. Check for a External Dependencies folder.
    Inside of that folder there should be the ge_prepass.h & c4d_colors.h header files.
    If they aren't there that's probably reason for the error.

    -ScottA



  • On 19/09/2013 at 09:46, xxxxxxxx wrote:

    Howdy,

    What function are you calling to get the colors?

    Adios,
    Cactus Dan



  • On 19/09/2013 at 20:29, xxxxxxxx wrote:

    Hi Scott & Dan,

    Scott - the undefined error was coming from using the id without the EX_, so my query was more about what should we be using in place of this (as I'm wanting to use some of the default interface colours Cinema already has, but if they're being taken out, what could/should we be looking at to use in it's place). From what I had read, I was under the impression that the EX_ was to signal that the ID was no longer being supported (and only available as EX_etc for backwards compatibility perhaps).

    Dan - sorry I misread your question in first response. I'm calling the following to get the colour:

      
    this->DrawSetPen(COLOR_TEXT_EDIT); // and etc for each colour change   
    

    WP.

    EDIT: update for Dan!!



  • On 20/09/2013 at 06:36, xxxxxxxx wrote:

    Howdy,

    Some settings you may only be able to get by accessing the world container like this:

    BaseContainer bc = GetWorldContainer();
    LONG cpuCnt = bc.GetLong(WPREF_CPUCOUNT);
    

    ... but you'd need to know what container they're in, if they're not listed in the documentation or in the headers, and they may also be in a subcontainer. 😠

    Adios,
    Cactus Dan



  • On 20/09/2013 at 23:23, xxxxxxxx wrote:

    OK, here's what I've done. On my install, the colour in the preferences I'm wanting to use appears to default by referencing another color - COLOR_EDIT, so I'll stick with that in my Draw() code. It's just a clickable collapse type draw of a small box so it's not a big deal. Atleast it will stay in tune with the text colour I guess too!

    Thanks for the GetWorldContainer() Dan, something to keep in the memory banks - particularly the CPUCOUNT flag - I'm wishing to play around with some loosely-related hardware numbers etc at some point!

    WP.



  • On 24/09/2013 at 00:57, xxxxxxxx wrote:

    Hi,

    Sorry for the late reply. I got more information from the developers.

    The color used for the Object Manager text is COLOR_SB_TEXT.
    These color IDs are used for the OM background:
    COLOR_SB_BG1, COLOR_SB_BG2, COLOR_SB_TEXTHG1, COLOR_SB_TEXTHG2.

    See COLOR_SB_ enum for more Object Manager color IDs.


Log in to reply