Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6623)

Issue 14454056: This patch makes the wm.progress_* bpy methods pump the message queue.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by Artfunkel
Modified:
10 years, 6 months ago
Reviewers:
brechtvl
Visibility:
Public.

Description

This patch makes the wm.progress_update bpy methods pump the message queue. Results are: * Users can cancel scripts with Esc * User input is ignored until the script finishes (except Esc) * Blender's window can be moved, minimised etc. while the script is running * On Windows, pumping avoids the "Not Responding" state Scripts which don't call the progress_update methods (e.g. UI panels) are not affected by these changes.

Patch Set 1 #

Patch Set 2 : Removed input blocking and Esc to cancel #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -11 lines) Patch
M blender/source/blender/blenkernel/BKE_global.h View 1 chunk +3 lines, -0 lines 0 comments Download
M blender/source/blender/makesrna/intern/rna_wm_api.c View 3 chunks +16 lines, -10 lines 0 comments Download
M blender/source/blender/python/BPY_extern.h View 1 chunk +2 lines, -0 lines 0 comments Download
M blender/source/blender/python/intern/bpy_interface.c View 1 chunk +1 line, -0 lines 0 comments Download
M blender/source/blender/python/intern/bpy_rna.c View 1 chunk +3 lines, -0 lines 0 comments Download
M blender/source/blender/python/intern/bpy_util.c View 1 chunk +5 lines, -0 lines 0 comments Download
M blender/source/blender/windowmanager/intern/wm_draw.c View 1 chunk +2 lines, -0 lines 0 comments Download
M blender/source/blender/windowmanager/intern/wm_event_system.c View 1 3 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 6
brechtvl
Shouldn't this be an API function that scripts can call, to see if escape was ...
10 years, 6 months ago (2013-10-10 16:06:07 UTC) #1
brechtvl
Also, dropping events is problematic. Users often press keys faster than the tools, and this ...
10 years, 6 months ago (2013-10-10 16:09:06 UTC) #2
Artfunkel
Thanks Brecht. > Shouldn't this be an API function that scripts can call, to see ...
10 years, 6 months ago (2013-10-10 16:23:13 UTC) #3
brechtvl
On 2013/10/10 16:23:13, Artfunkel wrote: > Thanks Brecht. > > > Shouldn't this be an ...
10 years, 6 months ago (2013-10-10 17:31:13 UTC) #4
Artfunkel
Removed input blocking and Esc to cancel
10 years, 6 months ago (2013-10-11 10:20:18 UTC) #5
Artfunkel
10 years, 6 months ago (2013-10-11 10:28:55 UTC) #6
In more detail:

Adding a "script cancelled" function to check will require some more thought,
plus I'd like to hear some more opinions on its merit vs. a keyboard interrupt,
so for now I've removed the whole feature.

You're totally right on the problems with blocking input in general, but there
is still one scenario where we should consider doing it: if the window has been
resized, clicks on outdated screen image won't go land they were intended to
when Blender wakes up and refreshes its layout.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b