[Python API] Not working `alert' property of 'bpy.types.UILayout' that contains 'popover' #109778
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#109778
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
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.86
Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash:
e1ccd9d4a1d3
Worked: seems to be never worked
'Alert' property of 'bpy.types.UILayout' that contains 'popover' is not displayed
Exact steps for others to reproduce the error
space_outliner.py
OUTLINER_PT_filter
row layoutalert
property toTrue
andactive
property toFalse
Expected:
We expect row to be of red color because of
alert=True
and reduced opacity because ofacitve=False
Result:
It is not working for row layout that contains
popover
methodCan confirm.
I have put up an experimental patch supporting this, see ##109828.
I assume the purpose is to hint at a problem that is inside those popus/menus, right?
To increase the chance of this being supported, could you elaborate a bit on the usecase you have in mind (why is this important to you?)
Yes, in my addon I have something similar to Outliner panel with objects and I would like to attract user attention when something is filtered. I use asterix for now but it would be more laconic to use the standard alert behaviour
Please do not use
alert
for simply showing if a list is filtered or not. That styling is calledalert
for a reason, to be used when there is action needed from the user or to warn about something destructive (like overriding data), or when things don't work as expected (missing modifier data).I specially initially didn't mention my case. If we are discussing about color user attraction, I would prefer
UIlayout.info
,UILayout.warning
color schemes. But since they do not exist and we can not manage layout colors, I see onlyalert
property that is available to affect layout.Ok, but all this is not important to the question of why layout behaviour regarding
alert
property is different and why it is not mentioned in documentation.Let's imagine the case when there will be regular expression inside the filter panel and it will be written with critical error in regular expression