Revision: 37064
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37064
Author:   aligorith
Date:     2011-06-01 06:09:34 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Bugfix [#27535] Insert delta key via IKey menu doesn't work well

Index needed to be incrememented regardless of whether Keying Set is
able to be shown, otherwise lookup fails with wrong Keying Set found

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/animation/keyingsets.c

Modified: branches/soc-2011-pepper/source/blender/editors/animation/keyingsets.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/animation/keyingsets.c      
2011-06-01 06:05:08 UTC (rev 37063)
+++ branches/soc-2011-pepper/source/blender/editors/animation/keyingsets.c      
2011-06-01 06:09:34 UTC (rev 37064)
@@ -782,19 +782,19 @@
         *      - these are listed in the order in which they were defined for 
the active scene
         */
        if (scene->keyingsets.first) {
-               for (ks= scene->keyingsets.first; ks; ks= ks->next) {
+               for (ks= scene->keyingsets.first; ks; ks=ks->next, i++) {
                        if (ANIM_keyingset_context_ok_poll(C, ks))
-                               uiItemIntO(layout, ks->name, ICON_NONE, 
op_name, "type", i++);
+                               uiItemIntO(layout, ks->name, ICON_NONE, 
op_name, "type", i);
                }
                uiItemS(layout);
        }
        
        /* builtin Keying Sets */
        i= -1;
-       for (ks= builtin_keyingsets.first; ks; ks= ks->next) {
+       for (ks= builtin_keyingsets.first; ks; ks=ks->next, i--) {
                /* only show KeyingSet if context is suitable */
                if (ANIM_keyingset_context_ok_poll(C, ks))
-                       uiItemEnumO_value(layout, ks->name, ICON_NONE, op_name, 
"type", i--);
+                       uiItemEnumO_value(layout, ks->name, ICON_NONE, op_name, 
"type", i);
        }
        
        uiPupMenuEnd(C, pup);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to