diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-09 12:44:11 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-09 12:46:28 +0300 |
commit | 8ddf7556a512b2b2ce89b75c9660e01a7aba8675 (patch) | |
tree | af98ecda886e9a12f65a30eba87357ea011eed8a /source/blender/editors/space_outliner | |
parent | ea5fe7abc183c1e53d327f97280f589499fe60bb (diff) |
Fix T78718: Crash when deleting particle system modifier with the X Shortcut.
Duplication and deletion code of modifiers was totally wrong for
particle system, that special weird thing needs its own custom
management.
Note that for now I chose not to duplicate the particle settings ID when
duplicating the modifier...
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index a77b5424eb6..419e25d5dca 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1127,6 +1127,7 @@ static void modifier_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem { bContext *C = (bContext *)Carg; Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); ModifierData *md = (ModifierData *)te->directdata; Object *ob = (Object *)outliner_search_back(te, ID_OB); @@ -1141,7 +1142,7 @@ static void modifier_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); } else if (event == OL_MODIFIER_OP_DELETE) { - ED_object_modifier_remove(NULL, bmain, ob, md); + ED_object_modifier_remove(NULL, bmain, scene, ob, md); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER | NA_REMOVED, ob); te->store_elem->flag &= ~TSE_SELECTED; } |