2.5 - Keying Sets Bugfix
authorJoshua Leung <aligorith@gmail.com>
Tue, 25 Aug 2009 10:32:53 +0000 (10:32 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 25 Aug 2009 10:32:53 +0000 (10:32 +0000)
Single-value properties in KeyingSets were not getting keyframed.

source/blender/editors/animation/keyingsets.c

index f19372069c3689bb58c14c2d7717d06490afaf2d..d22fe763ad48baad48485938c33bdb296f402ecb 100644 (file)
@@ -916,7 +916,7 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
                         * normal non-array entries get keyframed correctly
                         */
                        i= ksp->array_index;
-                       arraylen= i+1;
+                       arraylen= i;
                        
                        /* get length of array if whole array option is enabled */
                        if (ksp->flag & KSP_FLAG_WHOLE_ARRAY) {
@@ -928,6 +928,10 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
                                        arraylen= RNA_property_array_length(prop);
                        }
                        
+                       /* we should do at least one step */
+                       if (arraylen == i)
+                               arraylen++;
+                       
                        /* for each possible index, perform operation 
                         *      - assume that arraylen is greater than index
                         */