Newbie willing to learn how to use a color chooser



  • On 18/10/2015 at 06:35, xxxxxxxx wrote:

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

    ---------
    Hi people !

    As said, i'm total newbie on C4D SDK and i'm willing to understand how is works step by step.

    I was doing an extension of the SubDialog example on the SDK.
    I added a "color chooser"

    AddColorChooser(1005,BFH_SCALEFIT | BFV_SCALEFIT);
    and "color field"
    AddColorField(1006,BFH_SCALEFIT | BFV_SCALEFIT);
    My little question is how to read this value back on the code ?
    I assume i should be done on the "Command" funtion ?

    virtual Bool Command(Int32 id, const BaseContainer& msg) 
    {
    switch(id)
    {
    	case 1005:
    	/* how to retrieve the color picker color ? */ 
    	break;
    	case 1006:
    	/* how to retrieve the color picker color ? */ 
    	break;
    }
    }
    

    Any links to a deeper understanding of the whole C4D SDK will be much appreciated...



  • On 19/10/2015 at 01:42, xxxxxxxx wrote:

    Hello,

    to read the value of a color field you can use GetColorField(). You find an example on how to use it in the C++ examples or on GitHub.

    Best wishes,
    Sebastian



  • On 30/10/2015 at 10:21, xxxxxxxx wrote:

    Hello,

    was your question answered?

    Best wishes,
    Sebastian


Log in to reply