From db770e903a94753840f847432697fba97bb3ec78 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 Oct 2025 11:54:35 +0000 Subject: [PATCH] UI: hide RNA properties that expand into themselves in the outliner Mitigate the problem reported by #145877 where expanding the outliner eventually runs out of stack memory. The ViewLayer.despsgraph and node sockets would expand indefinitely. I'm not sure if the issue is solved as expanding makes the outliner unusably slow. --- source/blender/makesrna/intern/rna_layer.cc | 1 + source/blender/makesrna/intern/rna_nodetree.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/blender/makesrna/intern/rna_layer.cc b/source/blender/makesrna/intern/rna_layer.cc index cce043c147f..7e062c62b5e 100644 --- a/source/blender/makesrna/intern/rna_layer.cc +++ b/source/blender/makesrna/intern/rna_layer.cc @@ -706,6 +706,7 @@ void RNA_def_view_layer(BlenderRNA *brna) /* Dependency Graph */ prop = RNA_def_property(srna, "depsgraph", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Depsgraph"); + RNA_def_property_flag_hide_from_ui_workaround(prop); RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON); RNA_def_property_ui_text(prop, "Dependency Graph", "Dependencies in the scene data"); RNA_def_property_pointer_funcs(prop, "rna_ViewLayer_depsgraph_get", nullptr, nullptr, nullptr); diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index 524a16e613d..0aa80ae977a 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -8935,6 +8935,7 @@ static void rna_def_node(BlenderRNA *brna) "rna_NodeInputs_lookup_string", nullptr); RNA_def_property_struct_type(prop, "NodeSocket"); + RNA_def_property_flag_hide_from_ui_workaround(prop); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text(prop, "Inputs", ""); rna_def_node_sockets_api(brna, prop, SOCK_IN); @@ -8951,6 +8952,7 @@ static void rna_def_node(BlenderRNA *brna) "rna_NodeOutputs_lookup_string", nullptr); RNA_def_property_struct_type(prop, "NodeSocket"); + RNA_def_property_flag_hide_from_ui_workaround(prop); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text(prop, "Outputs", ""); rna_def_node_sockets_api(brna, prop, SOCK_OUT);