Python: Modal operator's 'report' behaves differently when called from non-modal operator #48717
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#48717
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?
Blender Version
Broken: 2.77a and
Description of error
Calls to
self.report()
from the modal operator are not shown in the UI, when that modal operator is called from a non-modal operator. This makes it difficult to communicate with the user from long-running operators.Furthermore, there is a difference in console output:
Modal operator called from space-menu:
Modal operator called from non-modal operator:
Exact steps for others to reproduce the error
Open the attached blend file and run its script: test_nonmodal_calling_modal.blend
Press SPACE in the 3d viewport (under the text editor) and choose 'Modal operator -- run me first'.
See a
self.report({'INFO'})
with decreasing counter appear four times, for counter=3, 2, 1, 0.Inspect the console output, and see that there are four log entries one second apart, and below that only one Info line from
self.report({'INFO'})
with counter=0, which was printed after the modal operator was stopped.Press SPACE in the 3d viewport and choose 'Non-modal operator -- run me second'.
Press the 'OK' button or hit Enter.
See the
self.report({'INFO'})
from the non-modal operator, but not from the modal operator it calls.Inspect the console output, and see that there are four log entries one second apart, and below that four Info lines from
self.report({'INFO'})
with counter=3, 2, 1, 0, which were printed after the modal operator was stopped.Changed status to: 'Open'
Added subscriber: @dr.sybren
Added subscriber: @VukGardasevic
Modal operator behaves differently when called from non-modal operatorto Python: Modal operator's 'report' behaves differently when called from non-modal operatorAdded subscriber: @mont29
Tried to understand follow that report thing this afternoon, with not much luck… In fact, I do not understand why the report of the first, directly called modal op works, since afaict python creates own report when calling an op, with
RPT_OP_HOLD
, which is supposed to prevent its drawing in header bar (seewm_operator_reports
andwm_add_reports
)…Hopefully @ideasman42 will know better!
This issue was referenced by blender/blender@f1253f5d2b
Changed status from 'Open' to: 'Resolved'
Awesome! Thanks for the quick fix :)