[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27589] trunk/blender/source/blender: Bugfix: Autokeying was non-functional after the Keying Sets refactor
Joshua Leung
aligorith at gmail.com
Thu Mar 18 08:53:46 CET 2010
Revision: 27589
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27589
Author: aligorith
Date: 2010-03-18 08:53:46 +0100 (Thu, 18 Mar 2010)
Log Message:
-----------
Bugfix: Autokeying was non-functional after the Keying Sets refactor
- The RNA wrapping for the generate callback was still wrong, with the primary effect being that C-code calling this had unexpected consequences that were hard to debug.
- Fixed some defective checks that meant that when specifying the RNA-pointers for the Keying Set to use (rather than using the Keying Set's own iterator callback) would never add any info.
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/keyingsets.c
trunk/blender/source/blender/makesrna/intern/rna_animation.c
Modified: trunk/blender/source/blender/editors/animation/keyingsets.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyingsets.c 2010-03-18 07:05:20 UTC (rev 27588)
+++ trunk/blender/source/blender/editors/animation/keyingsets.c 2010-03-18 07:53:46 UTC (rev 27589)
@@ -662,11 +662,14 @@
tRKS_DSource *ds;
/* sanity checks
- * we must have at least one valid data pointer to use
+ * - we must have somewhere to output the data
+ * - we must have both srna+data (and with id too optionally), or id by itself only
*/
- if (ELEM(NULL, dsources, srna) || ((id == data) && (id == NULL)))
+ if (dsources == NULL)
return;
-
+ if (ELEM(NULL, srna, data) && (id == NULL))
+ return;
+
/* allocate new elem, and add to the list */
ds = MEM_callocN(sizeof(tRKS_DSource), "tRKS_DSource");
BLI_addtail(dsources, ds);
Modified: trunk/blender/source/blender/makesrna/intern/rna_animation.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_animation.c 2010-03-18 07:05:20 UTC (rev 27588)
+++ trunk/blender/source/blender/makesrna/intern/rna_animation.c 2010-03-18 07:53:46 UTC (rev 27589)
@@ -131,7 +131,7 @@
RNA_parameter_set_lookup(&list, "ksi", &ksi);
RNA_parameter_set_lookup(&list, "context", &C);
RNA_parameter_set_lookup(&list, "ks", &ks);
- RNA_parameter_set_lookup(&list, "data", &data);
+ RNA_parameter_set_lookup(&list, "data", data);
/* execute the function */
ksi->ext.call(&ptr, func, &list);
@@ -404,7 +404,7 @@
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "ks", "KeyingSet", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "data", NULL, "", ""); // "AnyType"...
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
}
More information about the Bf-blender-cvs
mailing list