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

    Newbie willing to learn how to use a color chooser

    SDK Help
    0
    3
    290
    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 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...

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

        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

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

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

          Hello,

          was your question answered?

          Best wishes,
          Sebastian

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