Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-11-29 19:26:46 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-11-29 19:26:46 +0400
commit9c0f557b35acf26fdc95dc118dbf29f91731d2c2 (patch)
treebf76246b739044cb9a3826f4808e9b1a47163d6b /source/blender/windowmanager/intern/wm_jobs.c
parent6a99ebcc72b136b74d1c3a154bcb7de5dae3fb38 (diff)
Fix #27328: Undoing an operation while baking fluids freezes Blender
Prevent Undo be run if there are any jobs are currently running. This also makes sense with such jobs as multires baker, for example.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_jobs.c')
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index 16691ac5ab0..2d0d0f92a44 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -505,3 +505,13 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt)
}
}
+int WM_jobs_has_running(wmWindowManager *wm)
+{
+ wmJob *steve;
+
+ for(steve= wm->jobs.first; steve; steve= steve->next)
+ if(steve->running)
+ return 1;
+
+ return 0;
+}