From b2b6286366e67af41ee71fa6ef181bb1ba55610d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 19 Jan 2024 15:28:34 +0100 Subject: [PATCH] Depsgraph: Avoid implicit tagging on hide_viewport changes The update callback of this property does proper tagging. Should be no functional changes, but allows the depsgraph to make more optimal decision on avoiding unneeded recalculations. In practice this should avoid unnecessary re-evaluation when toggling this option on objects on outliner. Ref #117335 --- source/blender/makesrna/intern/rna_layer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/makesrna/intern/rna_layer.cc b/source/blender/makesrna/intern/rna_layer.cc index 3fae31ae4e4..74f85c206d4 100644 --- a/source/blender/makesrna/intern/rna_layer.cc +++ b/source/blender/makesrna/intern/rna_layer.cc @@ -590,6 +590,7 @@ static void rna_def_object_base(BlenderRNA *brna) prop = RNA_def_property(srna, "hide_viewport", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, nullptr, "flag", BASE_HIDDEN); RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); + RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); /* The update callback does tagging. */ RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1); RNA_def_property_ui_text(prop, "Hide in Viewport", "Temporarily hide in viewport");