[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37064] branches/soc-2011-pepper/source/ blender/editors/animation/keyingsets.c: Bugfix [#27535] Insert delta key via IKey menu doesn't work well

Joshua Leung aligorith at gmail.com
Wed Jun 1 08:09:34 CEST 2011


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);




More information about the Bf-blender-cvs mailing list