[Bf-blender-cvs] [f2a4dd4d27a] soc-2020-outliner: Outliner: Add property to show the left column

Nathan Craddock noreply at git.blender.org
Sat Jun 6 00:47:02 CEST 2020


Commit: f2a4dd4d27a9402434541bcac32b70a67291b5b8
Author: Nathan Craddock
Date:   Fri Jun 5 11:44:51 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rBf2a4dd4d27a9402434541bcac32b70a67291b5b8

Outliner: Add property to show the left column

Add a property to show the left column for the activate/mode toggle
buttons. This needs versioning to apply to the default scene.

===================================================================

M	release/scripts/startup/bl_ui/space_outliner.py
M	source/blender/editors/space_outliner/space_outliner.c
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index ee8015df273..8d602f82a52 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -352,6 +352,10 @@ class OUTLINER_PT_filter(Panel):
         row.prop(space, "use_sync_select", text="Sync Selection")
         layout.separator()
 
+        row = layout.row(align=True)
+        row.prop(space, "show_left_column", text="Show Left Column")
+        layout.separator()
+
         col = layout.column(align=True)
         col.label(text="Search:")
         col.prop(space, "use_filter_complete", text="Exact Match")
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 9450136b6a6..5c5914a8bcd 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -308,7 +308,7 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
   soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_HIDE;
   soutliner->outlinevis = SO_VIEW_LAYER;
   soutliner->sync_select_dirty |= WM_OUTLINER_SYNC_SELECT_FROM_ALL;
-  soutliner->flag |= SO_SYNC_SELECT;
+  soutliner->flag = SO_SYNC_SELECT | SO_LEFT_COLUMN;
 
   /* header */
   region = MEM_callocN(sizeof(ARegion), "header for outliner");
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 31a8d967ccf..ee68878f3ee 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -285,6 +285,7 @@ typedef enum eSpaceOutliner_Flag {
   /* SO_HIDE_KEYINGSETINFO = (1 << 3), */ /* UNUSED */
   SO_SKIP_SORT_ALPHA = (1 << 4),
   SO_SYNC_SELECT = (1 << 5),
+  SO_LEFT_COLUMN = (1 << 6),
 } eSpaceOutliner_Flag;
 
 /* SpaceOutliner.filter */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index df0d514fabf..538de159d45 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3096,6 +3096,12 @@ static void rna_def_space_outliner(BlenderRNA *brna)
       prop, "Sync Outliner Selection", "Sync outliner selection with other editors");
   RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
 
+  prop = RNA_def_property(srna, "show_left_column", PROP_BOOLEAN, PROP_NONE);
+  RNA_def_property_boolean_sdna(prop, NULL, "flag", SO_LEFT_COLUMN);
+  RNA_def_property_ui_text(
+      prop, "Show Left Column", "Show the left column for mode toggle and activation");
+  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
+
   /* Granular restriction column option. */
   prop = RNA_def_property(srna, "show_restrict_column_enable", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_ENABLE);



More information about the Bf-blender-cvs mailing list