Python Documentation - Icon Color
-
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,
.delCinema 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)
-
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 -
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 -
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