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
This commit is contained in:
Sergey Sharybin
2024-01-19 15:28:34 +01:00
committed by Sergey Sharybin
parent 85ff988f99
commit b2b6286366

View File

@@ -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");