Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-31 22:45:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-31 22:45:26 +0300
commit995fa1f4c0b1dc746b0978033b41984a653784e4 (patch)
tree65f02fd604184a901a191d1314a3b05bfb489577 /source/blender/makesrna/intern/rna_space.c
parent14dee6d7a59f16761201798f85e60d09bd353750 (diff)
UI: new tool properties space type
This currently shows panels that were in the 2.79 3D view toolbar which are now popovers. In some cases it's useful for these to stay open. This commit adds a space type to do this. Note this is currently empty in object mode.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 19fd87c0735..6b54740a7a1 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -114,6 +114,12 @@ const EnumPropertyItem rna_enum_space_image_mode_items[] = {
{0, NULL, 0, NULL, NULL}
};
+/* Expanded into the Space.ui_type enum. */
+const EnumPropertyItem rna_enum_space_button_mode_items[] = {
+ {SB_SUBTYPE_DATA, "DATA_PROPERTIES", ICON_BUTS, "Data Properties", "Edit properties of active object and related data-blocks"},
+ {SB_SUBTYPE_TOOL, "TOOL_PROPERTIES", ICON_PREFERENCES, "Tool Properties", "Edit tool settings"},
+ {0, NULL, 0, NULL, NULL}
+};
#define V3D_S3D_CAMERA_LEFT {STEREO_LEFT_ID, "LEFT", ICON_RESTRICT_RENDER_OFF, "Left", ""},
#define V3D_S3D_CAMERA_RIGHT {STEREO_RIGHT_ID, "RIGHT", ICON_RESTRICT_RENDER_OFF, "Right", ""},
@@ -3000,6 +3006,13 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "SpaceButs");
RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
+ /* Not exposed to the UI (access via space-type selector). */
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "space_subtype");
+ RNA_def_property_enum_items(prop, rna_enum_space_button_mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "Arrangement of the panels");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL);
+
prop = RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);