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
    • Recent
    • Tags
    • Users
    • Login

    light color

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 507 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 13/09/2008 at 12:07, xxxxxxxx wrote:

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

      ---------
      hi, while trying c++ instead of coffee i face uncountable problems. one of them is how i can access the color of a light. in coffe i could use GetContainer, GetData and light_MAIN_F to access the light colors. but i just dont fine a way to access the lightcolor in c++.

      can anyone help me how to do this?

      thanks in advance,
      ello

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 13/09/2008 at 13:42, xxxxxxxx wrote:

        Again, many of these type of parameters of specific object types are stored as Attribute Parameters and not in the BaseContainer. One sure way to find out is to go into the resource/res/description folder and find the header and res files for the object type (for lights that would be olight.h and olight.res). If the values you want to set are specified there (such as LIGHT_COLOR), then you must use SetParameter()/GetParameter().

        > GeData          geData; \> obj->GetParameter(DescID(LIGHT_COLOR), geData, NULL); \> Vector          v =               geData.GetVector(); \> GePrint("Current Color = "+RealToString(v.x)+", "+RealToString(v.y)+", "+RealToString(v.z)); \> Vector          color =          Vector(1.0f,0.0f,0.0f);     // RED \> obj->SetParameter(DescID(LIGHT_COLOR), GeData(color), NULL); \> obj->Message(MSG_UPDATE);

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 13/09/2008 at 13:45, xxxxxxxx wrote:

          If you are looking for the description ID of the lightsource color (or any other ID of any object) you should take a look into the folder "CINEMA 4D\resource\res\description" and at the .h and .res files located there.

          In this case, look into "olight.res" and you'll see that the ID you must use the ID "LIGHT_COLOR".

          I guess you can access it using MyLight->GetDataInstance->GetVector(LIGHT_COLOR);
          But note that some parameters (I still don't know why) must be accessed using MyLight->GetParameter.

          Cheers,
          Jack

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 13/09/2008 at 13:45, xxxxxxxx wrote:

            Ha, too slow. Robert was first 😉

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 13/09/2008 at 17:55, xxxxxxxx wrote:

              thank you both very much!

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