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:
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_visibility.cc4
-rw-r--r--source/blender/editors/object/object_modifier.cc4
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc b/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc
index 7b6aec0a73c..a056ba1dfa7 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc
@@ -69,6 +69,10 @@ void deg_evaluate_object_modifiers_mode_node_visibility(::Depsgraph *depsgraph,
OperationNode *modifier_node = geometry_component->find_operation(OperationCode::MODIFIER,
modifier->name);
+ BLI_assert_msg(modifier_node != nullptr,
+ "Modifier node in depsgraph is not found. Likely due to missing "
+ "DEG_relations_tag_update().");
+
const bool modifier_enabled = modifier->mode & modifier_mode;
const int mute_flag = modifier_enabled ? 0 : DEPSOP_FLAG_MUTE;
if ((modifier_node->flag & DEPSOP_FLAG_MUTE) != mute_flag) {
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;