diff options
Diffstat (limited to 'source/blender/io/collada/BCAnimationCurve.cpp')
-rw-r--r-- | source/blender/io/collada/BCAnimationCurve.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp index fe90dc5d5fa..ac7fa81883a 100644 --- a/source/blender/io/collada/BCAnimationCurve.cpp +++ b/source/blender/io/collada/BCAnimationCurve.cpp @@ -329,8 +329,7 @@ bool BCAnimationCurve::is_transform_curve() const bool BCAnimationCurve::is_rotation_curve() const { std::string channel_type = this->get_channel_type(); - return (channel_type == "rotation" || channel_type == "rotation_euler" || - channel_type == "rotation_quaternion"); + return ELEM(channel_type, "rotation", "rotation_euler", "rotation_quaternion"); } float BCAnimationCurve::get_value(const float frame) @@ -426,10 +425,10 @@ bool BCAnimationCurve::add_value_from_rna(const int frame_index) if ((array_index >= 0) && (array_index < RNA_property_array_length(&ptr, prop))) { switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - value = (float)RNA_property_boolean_get_index(&ptr, prop, array_index); + value = float(RNA_property_boolean_get_index(&ptr, prop, array_index)); break; case PROP_INT: - value = (float)RNA_property_int_get_index(&ptr, prop, array_index); + value = float(RNA_property_int_get_index(&ptr, prop, array_index)); break; case PROP_FLOAT: value = RNA_property_float_get_index(&ptr, prop, array_index); @@ -449,16 +448,16 @@ bool BCAnimationCurve::add_value_from_rna(const int frame_index) /* not an array */ switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - value = (float)RNA_property_boolean_get(&ptr, prop); + value = float(RNA_property_boolean_get(&ptr, prop)); break; case PROP_INT: - value = (float)RNA_property_int_get(&ptr, prop); + value = float(RNA_property_int_get(&ptr, prop)); break; case PROP_FLOAT: value = RNA_property_float_get(&ptr, prop); break; case PROP_ENUM: - value = (float)RNA_property_enum_get(&ptr, prop); + value = float(RNA_property_enum_get(&ptr, prop)); break; default: fprintf(stderr, |