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-01 16:47:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
commit5fa7d1c1b4e7bde1d173caa60af0e273c86b6f0b (patch)
tree186a794aef722993c7067a657b4d007c62dd669b /source/blender/editors/physics/particle_boids.c
parentc34f831757e0985b7523b6e5bbfadd7dd6a2c161 (diff)
2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
Diffstat (limited to 'source/blender/editors/physics/particle_boids.c')
-rw-r--r--source/blender/editors/physics/particle_boids.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c
index 37de0d8f873..a18890881a8 100644
--- a/source/blender/editors/physics/particle_boids.c
+++ b/source/blender/editors/physics/particle_boids.c
@@ -35,6 +35,7 @@
#include "BKE_boids.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
+#include "BKE_main.h"
#include "BKE_particle.h"
#include "BLI_listbase.h"
@@ -99,6 +100,7 @@ void BOID_OT_rule_add(wmOperatorType *ot)
}
static int rule_del_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
@@ -125,7 +127,7 @@ static int rule_del_exec(bContext *C, wmOperator *op)
if(rule)
rule->flag |= BOIDRULE_CURRENT;
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -266,6 +268,7 @@ void BOID_OT_state_add(wmOperatorType *ot)
}
static int state_del_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
@@ -297,7 +300,7 @@ static int state_del_exec(bContext *C, wmOperator *op)
state->flag |= BOIDSTATE_CURRENT;
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);