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:
authorSergey Sharybin <sergey@blender.org>2022-08-15 12:54:21 +0300
committerSergey Sharybin <sergey@blender.org>2022-08-15 13:19:27 +0300
commitd8841d0aa341e05c8cb9559b116b7e2a9ec11882 (patch)
treeef3d86c9165075a916976da4432ddac7ca0e717a /source/blender/editors/object/object_modifier.cc
parent3c9956fe551eb4d12a088e5c00cc5719fc4db3cd (diff)
Fix T100394: Regression: Duplicating a modifier causes a crash
Need to update relations when modifiers are added or removed since those create nodes in the dependency graph. Added an assert statement to point at possible culprit so that issues can be fixed more quickly.
Diffstat (limited to 'source/blender/editors/object/object_modifier.cc')
-rw-r--r--source/blender/editors/object/object_modifier.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc
index e7cfcf48fd3..010a01f9d30 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -486,6 +486,9 @@ bool ED_object_modifier_move_to_index(ReportList *reports,
}
}
+ /* NOTE: Dependency graph only uses modifier nodes for visibility updates, and exact order of
+ * modifier nodes in the graph does not matter. */
+
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
@@ -1668,6 +1671,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
+ DEG_relations_tag_update(bmain);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;