diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-01 01:27:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-01 01:27:35 +0300 |
commit | 2b7edb77c96da305e9ce709fe8d87c03a031676a (patch) | |
tree | a7f80022778aaee443f79e82eef97e0dfca3c457 /source/blender/editors | |
parent | b425e94381a43353d1868aafd0478636235a1431 (diff) |
Fix fcurve color assignment
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } } |