[Bf-blender-cvs] [2b7edb77c96] master: Fix fcurve color assignment

Campbell Barton noreply at git.blender.org
Tue Aug 1 01:08:07 CEST 2017


Commit: 2b7edb77c96da305e9ce709fe8d87c03a031676a
Author: Campbell Barton
Date:   Tue Aug 1 08:27:35 2017 +1000
Branches: master
https://developer.blender.org/rB2b7edb77c96da305e9ce709fe8d87c03a031676a

Fix fcurve color assignment

===================================================================

M	source/blender/editors/animation/keyframing.c

===================================================================

diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index f2a35bb1553..e11d8bb1bba 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1073,10 +1073,11 @@ short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
 				/* for Loc/Rot/Scale and also Color F-Curves, the color of the F-Curve in the Graph Editor,
 				 * is determined by the array index for the F-Curve
 				 */
-				if (ELEM(RNA_property_subtype(prop), PROP_TRANSLATION, PROP_XYZ, PROP_EULER, PROP_COLOR, PROP_COORDS)) {
+				PropertySubType prop_subtype = RNA_property_subtype(prop);
+				if (ELEM(prop_subtype, PROP_TRANSLATION, PROP_XYZ, PROP_EULER, PROP_COLOR, PROP_COORDS)) {
 					fcu->color_mode = FCURVE_COLOR_AUTO_RGB;
 				}
-				else if (RNA_property_subtype(prop), PROP_QUATERNION) {
+				else if (ELEM(prop_subtype, PROP_QUATERNION)) {
 					fcu->color_mode = FCURVE_COLOR_AUTO_YRGB;
 				}
 			}




More information about the Bf-blender-cvs mailing list