[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26391] trunk/blender/source/blender/ editors/animation/keyframing.c: Inserting Keyframes Bugfix:

Joshua Leung aligorith at gmail.com
Fri Jan 29 10:32:13 CET 2010


Revision: 26391
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26391
Author:   aligorith
Date:     2010-01-29 10:32:13 +0100 (Fri, 29 Jan 2010)

Log Message:
-----------
Inserting Keyframes Bugfix:

When the API function is passed -1 for the index, non-array properties now get keyframed properly too. This fixes problems with the keyframe_insert() method on structs in the Py-API not working. 

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/keyframing.c

Modified: trunk/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframing.c	2010-01-29 08:13:31 UTC (rev 26390)
+++ trunk/blender/source/blender/editors/animation/keyframing.c	2010-01-29 09:32:13 UTC (rev 26391)
@@ -878,6 +878,13 @@
 	if (array_index == -1) { 
 		array_index= 0;
 		array_index_max= RNA_property_array_length(&ptr, prop);
+		
+		/* for single properties, increase max_index so that the property itself gets included,
+		 * but don't do this for standard arrays since that can cause corruption issues 
+		 * (extra unused curves)
+		 */
+		if (array_index_max == array_index)
+			array_index_max++;
 	}
 	
 	/* will only loop once unless the array index was -1 */





More information about the Bf-blender-cvs mailing list