diff options
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 8 |
1 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 059805fdf2d..ba5d1ee5250 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -166,7 +166,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *op) psys_check_boid_data(psys); - DAG_scene_sort(scene); + DAG_scene_sort(bmain, scene); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -193,6 +193,7 @@ void PARTICLE_OT_new(wmOperatorType *ot) static int new_particle_target_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; @@ -214,7 +215,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *op) BLI_addtail(&psys->targets, pt); - DAG_scene_sort(scene); + DAG_scene_sort(bmain, scene); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -238,6 +239,7 @@ void PARTICLE_OT_new_target(wmOperatorType *ot) static int remove_particle_target_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; @@ -262,7 +264,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *op) if(pt) pt->flag |= PTARGET_CURRENT; - DAG_scene_sort(scene); + DAG_scene_sort(bmain, scene); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); |