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>2010-08-24 02:16:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-24 02:16:45 +0400
commitf6c323aa42e94c4750f52940b47a0d57b503c1b9 (patch)
tree486b03bf59d3e022443c8e290f354265d0126578 /source/blender/makesrna/intern/rna_scene.c
parent1be4eda552aa97aa5f5fe43fd34196c57425a7c2 (diff)
- move more active properties into their collections:
scene.active_keying_set --> scene.keying_sets.active ...same for active_uv_texture. active_vertex_color, active_keyconfig, - move mesh.add_uv_layer() and mesh.add_vertex_color() into their collections also have them return the newly created layer and dont set the layer active. uvtex = mesh.uv_layers.new(name) vcol = mesh.vertex_colors.new(name)
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c46
1 files changed, 39 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index f09dd596f4f..442c4b64f91 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2905,6 +2905,43 @@ static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
+/* scene.keying_sets */
+static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+// FunctionRNA *func;
+// PropertyRNA *parm;
+
+ RNA_def_property_srna(cprop, "KeyingSets");
+ srna= RNA_def_struct(brna, "KeyingSets", NULL);
+ RNA_def_struct_sdna(srna, "Scene");
+ RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets");
+
+ /*
+ func= RNA_def_function(srna, "new", "rna_Curve_spline_new");
+ RNA_def_function_ui_description(func, "Add a new spline to the curve.");
+ parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline.");
+ RNA_def_function_return(func, parm);
+
+ func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
+ RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ */
+
+ prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyingSet");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+}
+
void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
@@ -3089,6 +3126,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+ rna_def_scene_keying_sets(brna, prop);
prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
@@ -3096,13 +3134,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "All Keying Sets", "All Keying Sets available for use (builtins and Absolute Keying Sets for this Scene)");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
- prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "KeyingSet");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL);
- RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
-
+ /* TODO, move into the collection */
prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL);