UI: support 'activate_init' for popups which refresh #71112
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
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#71112
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?
Currently 'activate_init' layout property doesn't work for popups which run their draw function multiple times once opened.
System Information
Operating system: Linux-5.3.7-arch1-1-ARCH-x86_64-with-arch 64 Bits
Graphics card: GeForce GTX 660M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21
Blender Version
Broken versions:
2.81 (sub 15), branch: master, commit date: 2019-10-24 19:00, hash:
892c3891ed
2.82 (sub 1), branch: master, commit date: 2019-10-24 19:11, hash:
2a3b5dc730
Short description of error
Setting the activate_init property of a UILayout causes weird behavior and often causes the blender ui to freeze. I'm including a test addon that utilizes activate_init in a panel, a popup, and an item within a UIList in a popup. Both the popup and the UIList item cause the whole ui to freeze after interacting with them, while the panel just isn't affected at all. The weird behavior only seems to happen after you press enter or otherwise finish interacting with the auto-activated field; everything acts like you would expect until you finish and find the UI is non-responsive.
The panel is named Test Panel and located in the Object tab of the Properties Editor.
The popup can be called by pressing ALT-T
The UIList can be called by pressing CTRL-T
Exact steps for others to reproduce the error
Install and activate the test addon.
Press one of the hotkeys.
Press enter to finish editing the auto activated field.
Try to pan the 3D View using the middle mouse button.
activate_init_bug_test.py
Added subscriber: @Imaginer
Added subscriber: @joules-2
I can confirm this freezes the UI.
I came across a crash however trying to capture an event.
Regardless of activate_init enabled or not. Tried to capture an event (i.e {'ESC'}) with a modal() handler added with invoke() however blender will crash on modal(). Could be related or a case of don't do that with popups.
Added subscriber: @MiroHorvath
Added subscriber: @JacquesLucke
Changed status from 'Needs Triage' to: 'Needs User Info'
I can confirm that this is freezing the UI as well.
It does not crash or is completely unresponsive though.
The File Close Dialog is still working as usual (when you try to close Blender). So it looks like there is an issue with the event handling somewhere.
@Imaginer Can you explain what the
test
variable is supposed to do? While I haven't used theactivate_init
feature myself yet, your use of thetest
variable seems weird.Interestingly, when I remove it, I actually get a crash.
@JacquesLucke I'm a little foggy on the details, but if I recall correctly I used
test
to make sureactivate_init
was only set once (so ui redraws wouldn't set it multiple times) to try and improve the result (could have been to avoid the crash). Another reason you'd want something like this is to allowactivate_init
to only be set in certain situations. I put this demonstration addon together quickly and didn't use blender's bool properties or annotation syntax, but I just tested and it performs the same.Thanks for taking a look at this. :)
Changed status from 'Needs User Info' to: 'Needs Triage'
Using Activate Init in an Addon Causes the Blender UI to Freezeto UI: support 'activate_init' for popups which refreshChanged status from 'Needs Triage' to: 'Confirmed'
This issue was referenced by
0840469ccd
Changed status from 'Confirmed' to: 'Resolved'
Added subscriber: @portnov
The freezing reproduces for me at Blender 2.90.1 and Blender 2.91
b00820c04d
. Was the fix included in some release?@portnov It works for me in 2.90.0, so maybe it's a regression. Since #75521 is still open it could also be related to that.
Perhaps it's hardware dependent?