[Bf-blender-cvs] [cae3c781e77] soc-2019-outliner: Outliner: Add sync selection property
Nathan Craddock
noreply at git.blender.org
Sun Jun 9 06:38:26 CEST 2019
Commit: cae3c781e777560c5dd8b6a07a04f820a46a9717
Author: Nathan Craddock
Date: Sat Jun 8 13:05:30 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBcae3c781e777560c5dd8b6a07a04f820a46a9717
Outliner: Add sync selection property
Adds a toggle to each outliner for synced selection
===================================================================
M release/scripts/startup/bl_ui/space_outliner.py
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 6832e3d463b..b5afe72aef9 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -46,6 +46,9 @@ class OUTLINER_HT_header(Header):
layout.separator_spacer()
+ row = layout.row(align=True)
+ row.prop(space, "use_sync_selection", text="")
+
row = layout.row(align=True)
if display_mode in {'SCENES', 'VIEW_LAYER'}:
row.popover(
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 20d4f7d96e4..c26f96fcc95 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -263,6 +263,7 @@ typedef enum eSpaceOutliner_Flag {
SO_FLAG_UNUSED_1 = (1 << 2), /* cleared */
SO_HIDE_KEYINGSETINFO = (1 << 3),
SO_SKIP_SORT_ALPHA = (1 << 4),
+ SO_SYNC_SELECTION = (1 << 5),
} eSpaceOutliner_Flag;
/* SpaceOutliner.filter */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 911035c5521..c9026962311 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2828,6 +2828,13 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sort Alphabetically", "");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
+ prop = RNA_def_property(srna, "use_sync_selection", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_SYNC_SELECTION);
+ RNA_def_property_ui_text(
+ prop, "Sync Outliner Selection", "Sync outliner selection with other editors");
+ RNA_def_property_ui_icon(prop, ICON_UV_SYNC_SELECT, 0);
+ 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