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

    Changing the Color field's color mode

    Cinema 4D SDK
    2
    3
    729
    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.
    • A
      aturtur
      last edited by

      Hi! Is it possible to change with a Python script the color field's color mode option (sRGB, Render, Display, Raw), when the project is set to use OpenColorIO color management?

      c4d_color_preview.jpg

      This would be a very beneficial feature. For example I have a Python plug-in that works like a color palette and it has 16 indiviual color field's. Cinema 4D sets color field to sRGB color mode by default and it is very cumbersome to change the color mode in every color field individually (from sRGB to Raw).

      Cheers,
      Arttu

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

        Hello @aturtur,

        Thank you for reaching out to us. What you want to do ist not possible, even in C++.

        We (Maxon) never expose GUIs but the data structures behind them. E.g., we do not expose the Object Manager but the things (BaseObject, BaseTag, etc.) the Object Manager is displaying. The same applies here, for the public API this is just a Vector, it has no access to the custom GUI that is used here to display this (color) vector. You cannot change the OCIO input mode or things like the color space (RGB, HSL, etc.).

        FYI: Even if you could change the mode, it would have zero effect on how you must get/set color parameters when a document is in OCIO mode. All operations are always in OCIO Render Space. I have shown in the C++ OCIO Manual how to emulate what the color chooser GUI does, but you cannot do this in Python at the moment, as OcioConverter has not been wrapped for Python.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        A 1 Reply Last reply Reply Quote 0
        • A
          aturtur @ferdinand
          last edited by

          Hi @ferdinand,

          Thanks for the reply and the information. Ok, it is an UX/UI thing.

          I know that the color value is just a Vector and the original value doesn't change when toggling between modes (sRGB, Render, Display and Raw). It's just confusing for the end user that by default C4D is displaying colors in sRGB mode (when using OCIO), especially when the given vector for the color is anyways in raw format.

          But as you said, it's UX/UI thing and I should do a feature request in Maxon's Support Center that it would be nice to be able to change the default mode for the color field.

          Thanks for the link to the OCIO article, really useful information!

          Cheers,
          Arttu

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