diff options
author | Thomas Dinges <blender@dingto.org> | 2010-07-04 13:42:00 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2010-07-04 13:42:00 +0400 |
commit | ce94f52dbc1f18b805436313d26cdcef804622e9 (patch) | |
tree | e80eb3ce48eecbe17fa7bd1704ca1379b9236ed1 /source/blender/makesrna | |
parent | db4d317f6be28cf5141537f48449b70f0a3a38b2 (diff) |
Fix for [#22714] Constraints stack : move up and move down buttons problem
* Constraint template now uses 2 rows as well, when the area width is small.
* UI Code could use some code/layout cleanup still, will look into that soon.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index d126f8543c6..a7f2761526e 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1937,11 +1937,16 @@ void RNA_def_constraint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Target Space", "Space that target is evaluated in"); /* flags */ + prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_OFF); + RNA_def_property_ui_text(prop, "Enabled", "Enable/Disable Constraint"); + RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1); + prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_EXPAND); RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI"); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); - + // XXX this is really an internal flag, but it may be useful for some tools to be able to access this... prop= RNA_def_property(srna, "disabled", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 29d871dd66e..16864985289 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -317,6 +317,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in."); RNA_def_function_return(func, parm); + RNA_def_boolean(func, "compact", 0, "", "Show a smaller version of the template, split on two lines."); func= RNA_def_function(srna, "template_preview", "uiTemplatePreview"); parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock."); |