Some icons cannot be overriden from python (e.g. 'Constraint.mute', 'use_fake_user') #97909
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#97909
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender Version
Broken: version: 3.3.0 Alpha, branch: master, commit date: 2022-05-06 11:54, hash:
c7bffc8fa2
Worked: Looks like this was once working in 2.80 (but has stopped working in 2.81)
Short description of error
Some boolean properties apply an offset to their icon depending on the state of the boolean. This offset is applied even when an icon override is used, like so:
UILayout.prop(icon=whatever)
.Workaround
Exact steps for others to reproduce the error
So this file works in 2.80 and is broken in 2.81:
icon_madness_2.blend
Found a workaround, added to the task description.
Can confirm.
Looks like this was once working in 2.80 (but has stopped working in 2.81)
Could it additionally be related to #93987?
So
mute
vsenabled
?So this file works in 2.80 and is broken in 2.81:
icon_madness_2.blend
Checkboxes (toggles are more correct) change the icon automatically to represent the on/off state.
It simply selects the next defined icon.
PROP_ICONS_CONSECUTIVE
But for hide/show properties it selects the previous icon.
UI_BUT_ICON_REVERSE
That's what you're seeing.
So there are three different checkboxes: "no icon", "consecutive" and "reverse consecutive" icon.
It's very confusing, but in general I don't see a bug in any of these cases.
Generally, you should not override default icons, in order not to confuse users.
#97909, #109080, #111366
CC @ChengduLittleA @PratikPB2123 @lichtwerk
Feels like it would be easier to just pass around 2 icons, one for each state.
In my use case, without icon overriding, I'm going to have 3 identical looking icons next to each other; One for each of CopyLoc, CopyRot, CopyScale constraint.
I still think the fact that icon overriding is done before the offset rather than after is a bug, otherwise it's not really an override. I don't see why anyone coding it would've had such an intention, especially when it worked fine in 2.80.
You can see the same behavior in 2.8 as well, try the code from #109080. What has changed is that an icon has been added to Disable Constraint property.
bf95ab6bb2
It's always been in Blender, it's not a bug, it's a feature to change icon of toggles. I don't want to say it can't be changed, I'm just saying it's intentional, and it's being used all over the place.
Thx checking @jenkm !
Will change to TODO then.
Drawing Constraint.mute in the UI with custom icon shows wrong iconto Some icons cannot be overriden from python (e.g. 'Constraint.mute', 'use_fake_user')Is this essentially a "won't fix"? Genuinely asking, so I know not to hold my breath or pester people further about this. I was expecting it to be a 5 minute fix for someone in the know, but if it turns out it's a massive rabbit hole then I understand.
I'll also edit the workaround into the task description to make it more visible for people who might encounter this issue in future.