[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50235] trunk/blender/source/blender/ editors/animation/keyframes_draw.c: fix [#32417] Grease Pencil color change + DopeSheet 'Summary' = crash

Campbell Barton ideasman42 at gmail.com
Mon Aug 27 08:55:34 CEST 2012


Revision: 50235
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50235
Author:   campbellbarton
Date:     2012-08-27 06:55:33 +0000 (Mon, 27 Aug 2012)
Log Message:
-----------
fix [#32417] Grease Pencil color change + DopeSheet 'Summary' = crash

summery wasn't checking fcurve types.

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

Modified: trunk/blender/source/blender/editors/animation/keyframes_draw.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_draw.c	2012-08-27 01:33:02 UTC (rev 50234)
+++ trunk/blender/source/blender/editors/animation/keyframes_draw.c	2012-08-27 06:55:33 UTC (rev 50235)
@@ -857,14 +857,22 @@
 		
 		/* loop through each F-Curve, grabbing the keyframes */
 		for (ale = anim_data.first; ale; ale = ale->next) {
-			fcurve_to_keylist(ale->adt, ale->data, keys, blocks);
 
-			if (ale->datatype == ALE_MASKLAY) {
-				mask_to_keylist(ac->ads, ale->data, keys);
+			switch (ale->datatype) {
+				case ALE_FCURVE:
+					fcurve_to_keylist(ale->adt, ale->data, keys, blocks);
+					break;
+				case ALE_MASKLAY:
+					mask_to_keylist(ac->ads, ale->data, keys);
+					break;
+				case ALE_GPFRAME:
+					gpl_to_keylist(ac->ads, ale->data, keys);
+					break;
+				default:
+					printf("%s: datatype %d unhandled\n", __func__, ale->datatype);
+					break;
+
 			}
-			else if (ale->datatype == ALE_GPFRAME) {
-				gpl_to_keylist(ac->ads, ale->data, keys);
-			}
 		}
 
 		BLI_freelistN(&anim_data);




More information about the Bf-blender-cvs mailing list