Page MenuHome

Incorrect Icon Displayed when Certain Bool Properties are True in Custom Panel
Closed, ArchivedPublic

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.41

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-08-12 10:43, hash: rB6293cf613127
Worked: Tested all the way back to 2.83, but none worked

Short description of error
When certain bool properties are set to true in a custom panel, the icon changes. Also, an error can appear in the console.


Exact steps for others to reproduce the error
I created a script that can be installed as an addon that best displays the bug. The three properties used in the script were the only ones I have found that cause the issue, but there may be more.

Event Timeline

Philipp Oeser (lichtwerk) closed this task as Archived.Sep 1 2021, 4:54 PM

Dont really think this is a bug.

The properties mentioned define their icon with e.g.:

RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, -1);

The -1 here indicates that there is a "reverse" icon available, this then gets flagged PROP_ICONS_REVERSE (thus the button gets flagged UI_BUT_ICON_REVERSE).
This results in the icon changing that way (taking the icon just before the specified icon).

Think this is all behaving as expected (it just is a bit obscure to use another icon on a property that clearly defines its own).
Not saying that this could not be prevented somehow, but that I would classify as improved behavior (and not a bug in the current behavior).

Thx reporting, but I am afraid this has to be closed.

(Just out of curiosity: what would have been the usecase for this?)