Custom icon is not drawn on header / addons prefs panel #48813
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#48813
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?
System Information
Kubuntu 16.04, GeForce 8800 GTS 512
Blender Version
Broken: 2.77a and
8bb69b6157
Short description of error
When drawing a button or label with a custom icon on a header or addons panel, the icon isn't shown. Only after forcing a redraw (for example by moving the mouse over the UI element) the icon gets drawn.
Exact steps for others to reproduce the error
If you go to the properties editor, objects tab, the script also registers a button there, in a custom panel. You can also see that it is drawn without the icon first, but is redrawn when the icon is loaded. My bet is that this redraw trigger doesn't happen for other areas.
Changed status to: 'Open'
Added subscriber: @dr.sybren
Added subscribers: @mont29, @Sergey
@mont29, is it something in your area?
Added subscriber: @ideasman42
Problem is that those 'custom icons from file' are asynchronously deferred loaded, using 'generic' icon generation job, which generates NC_MATERIAL notifications. Replacing those with NC_WINDOW does fix the issue, question is, do we accept that kind of 'redraw everything' message from icon generation? @ideasman42, what do you think?
@mont29, right, we can always add global redraw flags to workaround these issues. In this case I don't have a strong opinion,
though IMHO it's quite weak - the more add-ons use generated icons, the more we will redraw everything when they update.
I think we need a more flexible notification system which doesn't depend on hard coded values (making assumptions about whats shown in a region).
Currently a Python script may show any information in the UI, its totally hit-and-miss that the UI is refreshed when they're changed.
We could have design task for this (if someone has time to develop it...) would suggest moving to a publish/subscribe pattern for the notifier system where...
How fine-grained we need to be can be chosen later... per-property is possible but overkill. (probably ID & RNA-type is enough).
This way using dynamically generated icons is just a matter of asking to listen for changes to icons - a different kind of listener.
This allows for Python scripts to be able to register to be notified on changes too.
For the 3D-view for eg, it probably doesn't make sense to inspect whats drawn and listen to changes in each object's ID. It could just register a listener for changes to data-types (material, object-object data).
So something similar to the existing system could be done where needed.
While notifier is a weak solution it is the only one for now. So either we go this way or consider this a TODO.
Since for now we don't have have much addons who uses this function think it's acceptable to just use notifiers.
Yes, agree, for now notifier will do the work.
@ideasman42 your idea sounds nice, imho at this point should be part of the bigger 'workflow' 2.8 topic (as part of custom editors, which will require that kind of thing anyway)…
This issue was referenced by
f3f10e4515
Changed status from 'Open' to: 'Resolved'
Thanks guys!