From 70a7685d04fb0e71390ea6b5fefa359942253f6b Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 1 Dec 2021 21:45:41 -0500 Subject: UI: Add an option to display the node editor context path Since we have the overlays popover, it makes sense to allow toggling the context path like in the 3D viewport. This commit adds a property, and turns it on by default in existing files. Differential Revision: https://developer.blender.org/D13248 --- source/blender/makesrna/intern/rna_space.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index bf7a912e9e6..16e9a6208fb 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -7140,6 +7140,12 @@ static void rna_def_space_node_overlay(BlenderRNA *brna) RNA_def_property_boolean_default(prop, false); RNA_def_property_ui_text(prop, "Show Timing", "Display each node's last execution time"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); + + prop = RNA_def_property(srna, "show_context_path", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SN_OVERLAY_SHOW_PATH); + RNA_def_property_boolean_default(prop, true); + RNA_def_property_ui_text(prop, "Show Tree Path", "Display breadcrumbs for the editor's context"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); } static void rna_def_space_node(BlenderRNA *brna) -- cgit v1.2.3