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-06-16 15:48:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-16 17:28:42 +0300
commitd8c2c63c005b686c7489b06b889cd30cf9eeea9c (patch)
treed713b53a32d691537042fd16a1c61ea46388f1a1 /source/blender/makesrna/intern/rna_ui.c
parent8f2acda7d72da9370f7ec3013026fadb0842cb54 (diff)
UI: Add property decorator buttons
When use_property_split is enabled, this template adds buttons to set keyframes, (Alternative to showing color). See: T54951
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 8083ae35dc1..70aa4709d8c 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -963,6 +963,16 @@ static void rna_UILayout_property_split_set(PointerRNA *ptr, int value)
uiLayoutSetPropSep(ptr->data, value);
}
+static int rna_UILayout_property_decorate_get(PointerRNA *ptr)
+{
+ return uiLayoutGetPropDecorate(ptr->data);
+}
+
+static void rna_UILayout_property_decorate_set(PointerRNA *ptr, int value)
+{
+ uiLayoutSetPropDecorate(ptr->data, value);
+}
+
#else /* RNA_RUNTIME */
static void rna_def_ui_layout(BlenderRNA *brna)
@@ -1030,6 +1040,9 @@ static void rna_def_ui_layout(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_property_split", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_property_split_get", "rna_UILayout_property_split_set");
+
+ prop = RNA_def_property(srna, "use_property_decorate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_UILayout_property_decorate_get", "rna_UILayout_property_decorate_set");
}
static void rna_def_panel(BlenderRNA *brna)