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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-22 00:58:10 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-22 00:58:10 +0400
commit180d74ab572830958ecba6541d3cc7c652fa2296 (patch)
tree62280c60f822b4ab8b111d364187e69310bea6f2 /source/blender/makesrna/intern
parent5fb73d8b81fbd1823a6c807714d6b3589e918a3b (diff)
UI: List Template tweaks to get it a bit more usable
* Mouse wheel now scrolls the list. * Up/down key and alt mouse wheel change the active item. * Adding/removing items from the list now automatically scrolls so the active item is in the view. * Shift mouse wheel changes the size of the list widget to display more items. Lazy replacement for a proper grip. * Shape key list now displays the influence value next to the name, * Also fix the range of the value slider to match the defined min/max range.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_key.c1
-rw-r--r--source/blender/makesrna/intern/rna_ui.c29
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c2
3 files changed, 1 insertions, 31 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 9daf1155149..433e5a7e4a3 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -391,6 +391,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "curval");
RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_value_set", "rna_ShapeKey_value_range");
+ RNA_def_property_ui_range(prop, -10.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Value", "Value of shape key at the current frame.");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 303511a2dca..0a661e9aaf3 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -489,20 +489,6 @@ static void rna_UILayout_scale_y_set(PointerRNA *ptr, float value)
uiLayoutSetScaleY(ptr->data, value);
}
-static PointerRNA rna_UIListItem_layout_get(PointerRNA *ptr)
-{
- uiListItem *item= (uiListItem*)ptr->data;
- PointerRNA newptr;
- RNA_pointer_create(NULL, &RNA_UILayout, item->layout, &newptr);
- return newptr;
-}
-
-static PointerRNA rna_UIListItem_data_get(PointerRNA *ptr)
-{
- uiListItem *item= (uiListItem*)ptr->data;
- return item->data;
-}
-
#else // RNA_RUNTIME
static void rna_def_ui_layout(BlenderRNA *brna)
@@ -566,21 +552,6 @@ static void rna_def_ui_layout(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_y_get", "rna_UILayout_scale_y_set", NULL);
RNA_api_ui_layout(srna);
-
- /* list item */
-
- srna= RNA_def_struct(brna, "UIListItem", NULL);
- RNA_def_struct_ui_text(srna, "UI List Item", "User interface list.");
-
- prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "UILayout");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_UIListItem_layout_get", NULL, NULL);
-
- prop= RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "AnyType");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_UIListItem_data_get", NULL, NULL);
}
static void rna_def_panel(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index cce8fb0fef7..ad4557f76a1 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -335,8 +335,6 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
parm= RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use.");
- parm= RNA_def_collection(func, "items", 0, "", "Items visible in the list.");
- RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);