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

    Python Documentation - Icon Color

    Cinema 4D SDK
    2024 python
    2
    4
    810
    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.
    • .
      .del
      last edited by

      Hi - How can I set the icon color in the object manager to use the Display Color? The UX has options for None, Display Color, and Custom.

      The sdk and VS Code only show values for None and Custom.

      I'm not sure if the value was accidentally overlooked or if I'm approaching it incorrectly. I tried taking a stab at c4d.ID_BASELIST_ICON_COLORIZE_MODE_DISPLAYCOLOR but that did not work.

      thanks,
      .del

      Cinema 4D SDK 2024.2.0 documentation » Classic Resource Overview » Basic Properties

      Parameter: Icon Color

      Parameter ID: c4d.ID_BASELIST_ICON_COLORIZE_MODE
      
      Parameter Type: int
      
      Cycle Values:
      
              None (c4d.ID_BASELIST_ICON_COLORIZE_MODE_NONE)
      
              Custom (c4d.ID_BASELIST_ICON_COLORIZE_MODE_CUSTOM)
      
      i_mazlovI 1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov @.del
        last edited by i_mazlov

        Hi @del ,

        For the c4d.ID_BASELIST_ICON_COLORIZE_MODE cycle parameter the values None and Custom are static. The cycle value that corresponds to the "Display Color" UI button is populated dynamically, hence it was not retrieved by the script that composes documentation page.

        Setting the icon color of the object op to the "Display Color" value can be done in the following way:

        op[c4d.ID_BASELIST_ICON_COLORIZE_MODE] = c4d.ID_BASELIST_ICON_COLORIZE_MODE_CUSTOM + 1
        

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • .
          .del
          last edited by

          Thank you @i_mazlov . I had worked around it by setting it up as a custom color but my preference is to use the display color as I'm already setting that. I'll throw your solution into my project and give it a try.

          Do you think this might be changed in the future? If so I want to leave myself a note in the script to revisit the sdk.

          Have a great weekend,
          .del

          i_mazlovI 1 Reply Last reply Reply Quote 0
          • i_mazlovI
            i_mazlov @.del
            last edited by

            Hi @del,

            It's hard to predict future changes. It's likely the c4d.ID_BASELIST_ICON_COLORIZE_MODE_CUSTOM + 1 approach would stay untouched for the compatibility reasons, but who knows if there'd be any change requests that'd break this.

            Cheers,
            Ilia

            MAXON SDK Specialist
            developers.maxon.net

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