diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-13 12:02:48 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-13 12:02:48 +0300 |
commit | 1a79c6d36081268a0f0b9f7650471b09372df121 (patch) | |
tree | 0a645a43e421b961723be2febf17d8a5ac21d83a /source/blender/editors/physics/particle_object.c | |
parent | f234adf65c2ae741f33f2ed4433f2990d8f6de97 (diff) | |
parent | 67e8c1e1c7cfbb000de903c9c4e83874adba411f (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/intern/blendfile.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/particle.c
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index fbccdcfcdba..8a9eb369e66 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -82,13 +82,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); @@ -113,6 +114,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); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -122,7 +124,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 |