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>2013-12-16 20:21:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-16 20:55:45 +0400
commita621d1e48828d02a5e097dcfc218cc11d149e75f (patch)
tree3cb9594e0b70fe0ac46d7fc22c05b1ec9b977c72 /source/blender/makesrna/intern/rna_ui.c
parent2231b565f011e984d4ee6eeb33a80567b404e032 (diff)
UI: Tabs categories for panels (D75)
- works by defining panel categories, currently restricted to the toolbar. - no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple. - panel pinning is available in rmb menu or alt+lmb.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 39f305f7d47..a82763994f8 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -980,6 +980,11 @@ static void rna_def_panel(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_define_verify_sdna(TRUE);
+ prop = RNA_def_property(srna, "bl_category", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "type->category");
+ RNA_def_property_string_default(prop, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
+ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
+
prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
RNA_def_property_enum_items(prop, space_type_items);
@@ -1004,6 +1009,12 @@ static void rna_def_panel(BlenderRNA *brna)
RNA_def_property_enum_items(prop, panel_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG);
RNA_def_property_ui_text(prop, "Options", "Options for this panel type");
+
+ prop = RNA_def_property(srna, "use_pin", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PNL_PIN);
+ RNA_def_property_ui_text(prop, "Pin", "");
+ /* XXX, should only tag region for redraw */
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_uilist(BlenderRNA *brna)