[Python API] Not working `alert' property of 'bpy.types.UILayout' that contains 'popover' #109778

Open
opened 2023-07-06 13:56:29 +02:00 by Alex Zhornyak · 6 comments

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

  1. Open file space_outliner.py
  2. SetOUTLINER_PT_filter row layout alert property to True and active property to False

image

Expected:

We expect row to be of red color because of alert=True and reduced opacity because of acitve=False

Result:

image

It is not working for row layout that contains popover method

**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** 1. Open file `space_outliner.py` 2. Set`OUTLINER_PT_filter` row layout `alert` property to `True` and `active` property to `False` ![image](/attachments/37cfa2c5-237c-4aaa-98ad-f63e0264efd2) **Expected:** We expect row to be of red color because of `alert=True` and reduced opacity because of `acitve=False` **Result:** ![image](/attachments/105f5041-baec-48c8-a653-4d01a24ab40b) It is not working for row layout that contains `popover` method
Alex Zhornyak added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-07-06 13:56:29 +02:00
Member

Can confirm.

Can confirm.
Philipp Oeser added
Status
Confirmed
Module
Python API
and removed
Status
Needs Triage
labels 2023-07-07 11:17:55 +02:00
Member

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?)

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?)
Author

image

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

![image](/attachments/1ab8cfd1-c321-47c6-b0ec-445e5b1579ce) 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
Member

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 called alert 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 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 called `alert` 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).
Author

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 only alert 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.

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 only `alert` 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.
Author

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

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
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#109778
No description provided.