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:
Diffstat (limited to 'source/blender/editors/physics/physics_pointcache.c')
-rw-r--r--source/blender/editors/physics/physics_pointcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 689e51339f9..5ebbb00939e 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -89,7 +89,7 @@ void bake_console_progress_end(void *arg)
static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
- wmWindow *win = CTX_wm_window(C);
+ wmWindow *win = G.background ? NULL : CTX_wm_window(C);
PTCacheBaker baker;
@@ -171,7 +171,7 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
static int ptcache_bake_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- wmWindow *win = CTX_wm_window(C);
+ wmWindow *win = G.background ? NULL : CTX_wm_window(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
Object *ob= ptr.id.data;
PointCache *cache= ptr.data;