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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-13 11:57:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-13 11:57:10 +0300
commit67e8c1e1c7cfbb000de903c9c4e83874adba411f (patch)
tree79af3eb08fcb3f422e212ff88c3be2bc4eae4561 /source/blender/editors/physics
parent27882024176a3015e36305d19a763571e1a8c731 (diff)
Cleanup: remove more G.main from BKE area.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_object.c6
-rw-r--r--source/blender/editors/physics/physics_pointcache.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 8a363276c28..66c62d47340 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -77,13 +77,14 @@ static float I[4][4] = {{1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0
static int particle_system_add_exec(bContext *C, wmOperator *UNUSED(op))
{
+ Main *bmain = CTX_data_main(C);
Object *ob= ED_object_context(C);
Scene *scene = CTX_data_scene(C);
if (!scene || !ob)
return OPERATOR_CANCELLED;
- object_add_particle_system(scene, ob, NULL);
+ object_add_particle_system(bmain, scene, ob, NULL);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
@@ -108,6 +109,7 @@ void OBJECT_OT_particle_system_add(wmOperatorType *ot)
static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
+ Main *bmain = CTX_data_main(C);
Object *ob = ED_object_context(C);
Scene *scene = CTX_data_scene(C);
int mode_orig;
@@ -116,7 +118,7 @@ static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
mode_orig = ob->mode;
- object_remove_particle_system(scene, ob);
+ object_remove_particle_system(bmain, scene, ob);
/* possible this isn't the active object
* object_remove_particle_system() clears the mode on the last psys
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index dadd086a774..fc2f7e40645 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -163,7 +163,7 @@ static PTCacheBaker *ptcache_baker_create(bContext *C, wmOperator *op, bool all)
{
PTCacheBaker *baker = MEM_callocN(sizeof(PTCacheBaker), "PTCacheBaker");
- baker->main = CTX_data_main(C);
+ baker->bmain = CTX_data_main(C);
baker->scene = CTX_data_scene(C);
baker->bake = RNA_boolean_get(op->ptr, "bake");
baker->render = 0;