[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27573] trunk/blender/source/blender: PyKeyingSet Bugfixes:

Joshua Leung aligorith at gmail.com
Wed Mar 17 12:34:30 CET 2010


Revision: 27573
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27573
Author:   aligorith
Date:     2010-03-17 12:34:27 +0100 (Wed, 17 Mar 2010)

Log Message:
-----------
PyKeyingSet Bugfixes:
* With multiple objects selected, only one of the objects got keyframed. The code which was checking for duplicate paths was wrongly assuming to ignore the ID-block used still.

* Not registering a Keying Set as 'builtin' would crash on startup. I've made all Keying Sets fallback to adding as if they were local for now, but a better solution is coming soon.

* Fixed a typo in RNA function wrappers for the generator callback, since it was looking for the iterator only. This doesn't seem to have caused any problems (thankfully).

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/anim_sys.c
    trunk/blender/source/blender/editors/animation/keyingsets.c
    trunk/blender/source/blender/makesrna/intern/rna_animation.c

Modified: trunk/blender/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim_sys.c	2010-03-17 11:31:50 UTC (rev 27572)
+++ trunk/blender/source/blender/blenkernel/intern/anim_sys.c	2010-03-17 11:34:27 UTC (rev 27573)
@@ -557,15 +557,9 @@
 	KS_Path *ksp;
 	
 	/* sanity checks */
-	if ELEM(NULL, ks, rna_path)
+	if ELEM3(NULL, ks, rna_path, id)
 		return NULL;
 	
-	/* ID is optional for relative KeyingSets, but is necessary for absolute KeyingSets */
-	if (id == NULL) {
-		if (ks->flag & KEYINGSET_ABSOLUTE)
-			return NULL;
-	}
-	
 	/* loop over paths in the current KeyingSet, finding the first one where all settings match 
 	 * (i.e. the first one where none of the checks fail and equal 0)
 	 */
@@ -573,7 +567,7 @@
 		short eq_id=1, eq_path=1, eq_index=1, eq_group=1;
 		
 		/* id */
-		if ((ks->flag & KEYINGSET_ABSOLUTE) && (id != ksp->id))
+		if (id != ksp->id)
 			eq_id= 0;
 		
 		/* path */

Modified: trunk/blender/source/blender/editors/animation/keyingsets.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyingsets.c	2010-03-17 11:31:50 UTC (rev 27572)
+++ trunk/blender/source/blender/editors/animation/keyingsets.c	2010-03-17 11:34:27 UTC (rev 27573)
@@ -526,10 +526,10 @@
 	KeyingSet *ks;
 	
 	/* determine the KeyingSet list to include the new KeyingSet in */
-	if (ksi->builtin)
+	if (ksi->builtin==0 && scene)
+		list = &scene->keyingsets;
+	else
 		list = &builtin_keyingsets;
-	else
-		list = &scene->keyingsets;
 	
 	/* create a new KeyingSet 
 	 *	- inherit name and keyframing settings from the typeinfo

Modified: trunk/blender/source/blender/makesrna/intern/rna_animation.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_animation.c	2010-03-17 11:31:50 UTC (rev 27572)
+++ trunk/blender/source/blender/makesrna/intern/rna_animation.c	2010-03-17 11:34:27 UTC (rev 27573)
@@ -124,7 +124,7 @@
 	FunctionRNA *func;
 
 	RNA_pointer_create(NULL, ksi->ext.srna, ksi, &ptr);
-	func= RNA_struct_find_function(&ptr, "iterator");
+	func= RNA_struct_find_function(&ptr, "generate");
 
 	RNA_parameter_list_create(&list, &ptr, func);
 		/* hook up arguments */





More information about the Bf-blender-cvs mailing list