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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-04 12:58:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-04 12:58:38 +0400
commit7a55728b40e1434655406c5b8d0c409718de8f9f (patch)
treee95aa07d124d515aaf85f22f1d1f5bc0beb1b7c6 /source/blender/editors/physics/physics_pointcache.c
parent7a5d6a5eb1bf3764f80cbf1c463d2252e1724ba5 (diff)
Fix crash in point cache baking due to my recent changes.
Diffstat (limited to 'source/blender/editors/physics/physics_pointcache.c')
-rw-r--r--source/blender/editors/physics/physics_pointcache.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index da637f494dc..35f86a49aa7 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -34,13 +34,14 @@
#include "DNA_scene_types.h"
#include "BKE_context.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
+#include "BKE_modifier.h"
#include "BKE_particle.h"
+#include "BKE_pointcache.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_utildefines.h"
-#include "BKE_pointcache.h"
-#include "BKE_global.h"
-#include "BKE_modifier.h"
#include "BLI_blenlib.h"
@@ -87,11 +88,12 @@ void bake_console_progress_end(void *arg)
static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
wmWindow *win = G.background ? NULL : CTX_wm_window(C);
PTCacheBaker baker;
-
+ baker.main = bmain;
baker.scene = scene;
baker.pid = NULL;
baker.bake = RNA_boolean_get(op->ptr, "bake");
@@ -172,6 +174,7 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
}
static int ptcache_bake_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
wmWindow *win = G.background ? NULL : CTX_wm_window(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
@@ -188,6 +191,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
break;
}
+ baker.main = bmain;
baker.scene = scene;
baker.pid = pid;
baker.bake = RNA_boolean_get(op->ptr, "bake");