diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-11-29 05:42:47 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-11-29 05:42:47 +0300 |
commit | 65edb6e55f11f20a552d8f9fd1375923d9854e49 (patch) | |
tree | 531331b36fb1eba2e9173b1dccc4058f36cde15e /source/blender/makesrna/intern | |
parent | 16efe1ac46fca2fafda292344a37f1f2deede2a0 (diff) |
UI:
* Moved more of 3dview header to python
* Fixed the layout of the ui layers template to show the correct number of buttons
* Added support for layer icons (active layer, used layers)
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index b072da4f64a..b37bca202bb 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -861,6 +861,12 @@ static void rna_def_space_3dview(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, NULL, "rna_Space3DView_lock_camera_and_layers_set"); RNA_def_property_ui_text(prop, "Lock Camera and Layers", "Lock the active camera and layers to scene."); RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1); + + prop= RNA_def_property(srna, "used_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER); + RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1); + RNA_def_property_array(prop, 20); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something."); } static void rna_def_space_buttons(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index a726a5b628e..e15cc130899 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -310,6 +310,12 @@ void RNA_api_ui_layout(StructRNA *srna) func= RNA_def_function(srna, "template_layers", "uiTemplateLayers"); api_ui_item_rna_common(func); + parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); + parm= RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX); + RNA_def_property_flag(parm, PROP_REQUIRED); func= RNA_def_function(srna, "template_triColorSet", "uiTemplateTriColorSet"); api_ui_item_rna_common(func); |