Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Read Background Color from RS Camera

    Cinema 4D SDK
    python 2023
    2
    3
    520
    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.
    • C
      cybor09
      last edited by

      Hello!

      It is possible to read somehow the Color parameter from the Background section of the RS Camera?

      RSCamera[c4d.RSCAMERAOBJECT_BACKGROUND_COLOR]
      

      If I try to read it directly, it returns an error, and I didn't find a secondary ID to passtrough the value like in the RS Dome Light:

      RSDomeLight[c4d.REDSHIFT_LIGHT_DOME_TEX0, c4d.REDSHIFT_FILE_PATH]
      

      This is on C4D 2023.2.1and RS 3.5.16.

      Thanks!

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @cybor09
        last edited by

        Hey @cybor09,

        Thank you for reaching out to us! You almost got it. Redshift uses a special 4-channel data type for its colors, we talked here about it. But the camera object parameter you are interested in is a bit weird, as returns a float for REDSHIFT_COLORALPHA_COLOR where it should be a vector.

        Stuff seems to be laid out instead in the form 1000, 1001, 1002, 1003, i.e., VECTOR_X, VECTOR_Y, and VECTOR_Z for the alpha bit you cannot use the usual REDSHIFT_COLORALPHA_ALPHA which is already our y-component value. So, you must use the raw integer value here.

        Cheers,
        Ferdinand

        cda137cd-13e8-40e3-8dc1-a8b908b84f28-image.png

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • C
          cybor09
          last edited by

          Thanks a lot for the quick response @ferdinand ! I'll use the raw int values then, thanks 🙂

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