Using template_list() with invoke_props_dialog() #47657
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#47657
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 15.10
Nvidia GeForce 9600 GT (driver: 340.96)
Blender Version
Broken: 2.76b
Not reproducible in 2.77rc1 because of #47632.
Short description of error
An attempt to redraw property dialog that contains template_list() function crashes Blender:
Exact steps for others to reproduce the error
Changed status to: 'Open'
Added subscriber: @AleksandrZinovev-2
Added subscribers: @JulianEisel, @ideasman42, @mont29
Problem is, ui_list depends on a valid region available in context, and looks like context from popup do not have any region.
@JulianEisel, @ideasman42, do you know whether this is expected behavior? I'd assume we should get the temp popup region here?
Adding current temp
ARegion
to context in draw code solves the issue, see e.g. this quick patch:P330: #47657
Although it's pretty annoying, afaik it's intended behavior. Not 100% sure but I think
CTX_wm_menu
can be used to avoid this.Yes indeed, falling back to
CTX_wm_menu
in caseCTX_wm_region
returns NULL works in this case… Seems a bit odd to me though. :/Would do the other way around, falling back to
CTX_wm_region
whenCTX_wm_menu
fails.UI_block_draw
does this.I wish I could help with this bug but unfortunately I don't know c/cpp.
I noticed that when blender redraws dialogs it uses empty context object (region is None, space_data is None, etc). That behavior could cause other issues for context sensitive dialogs. Is it possible to "remember" context object that was used in invoke method and use it for redrawing?
Will commit that CTX_wm_menu 'hack' for now, but note that uilist remains a bit flacky in such usage (e.g. resize handle does not work that nice), would consider that a TODO though. Popups are not really meant to support such advanced UI items...
This issue was referenced by blender/blender@bd335f13fe
Changed status from 'Open' to: 'Resolved'