[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31549] trunk/blender: Fixing KeyingSets breakage from recent RNA renaming madness.

Joshua Leung aligorith at gmail.com
Tue Aug 24 08:52:16 CEST 2010


Revision: 31549
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31549
Author:   aligorith
Date:     2010-08-24 08:52:16 +0200 (Tue, 24 Aug 2010)

Log Message:
-----------
Fixing KeyingSets breakage from recent RNA renaming madness.

* 'Active' on TimeLine header needs to show choices ALL KeyingSets available (Builtins + Scene-Absolutes), not just the ones in Scene ("Absolute Paths")

* The active KeyingSet setting is needed/used-by for both of these.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_time.py
    trunk/blender/source/blender/makesrna/intern/rna_scene.c

Modified: trunk/blender/release/scripts/ui/space_time.py
===================================================================
--- trunk/blender/release/scripts/ui/space_time.py	2010-08-24 06:43:47 UTC (rev 31548)
+++ trunk/blender/release/scripts/ui/space_time.py	2010-08-24 06:52:16 UTC (rev 31549)
@@ -77,7 +77,7 @@
         layout.separator()
 
         row = layout.row(align=True)
-        row.prop_search(scene.keying_sets, "active", scene, "keying_sets", text="")
+        row.prop_search(scene.keying_sets_all, "active", scene, "keying_sets_all", text="")
         row.operator("anim.keyframe_insert", text="", icon='KEY_HLT')
         row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT')
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-08-24 06:43:47 UTC (rev 31548)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-08-24 06:52:16 UTC (rev 31549)
@@ -2952,14 +2952,40 @@
 	parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
 	RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
 	*/
+	
+	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);
+	
+	prop= RNA_def_property(srna, "active_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);
+	RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
+	RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+}
 
+static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
+{
+	StructRNA *srna;
+	PropertyRNA *prop;
+	
+	RNA_def_property_srna(cprop, "KeyingSetsAll");
+	srna= RNA_def_struct(brna, "KeyingSetsAll", NULL);
+	RNA_def_struct_sdna(srna, "Scene");
+	RNA_def_struct_ui_text(srna, "Keying Sets All", "All available keying sets");
+	
+	/* NOTE: no add/remove available here, without screwing up this amalgamated list... */
+	
 	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);
-
+	
 	prop= RNA_def_property(srna, "active_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);
@@ -3156,8 +3182,9 @@
 	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);
 	RNA_def_property_struct_type(prop, "KeyingSet");
-	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_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);
+	rna_def_scene_keying_sets_all(brna, prop);
 	
 	/* Tool Settings */
 	prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);





More information about the Bf-blender-cvs mailing list