Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-07-15 14:50:04 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-07-15 14:50:04 +0400
commitbd863ce58d86e30439018a5c376f6b1a1d5ecaa0 (patch)
tree3ac65ba6653c88d6f2c44d6c58b0c8d4acb7fbd3
parentcd88217b98d21f6b25fc9476c2b4c943f7c76cf6 (diff)
Collada miport: Report 'unknown animation class' only when relevant
-rw-r--r--source/blender/collada/AnimationImporter.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 643b2cdc2b0..445199dbdef 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -1687,6 +1687,18 @@ void AnimationImporter::evaluate_transform_at_frame(float mat[4][4], COLLADAFW::
}
}
+static void report_class_type_unsupported(const char *path,
+ const COLLADAFW::AnimationList::AnimationClass animclass,
+ const COLLADAFW::Transformation::TransformationType type)
+{
+ if (animclass == COLLADAFW::AnimationList::UNKNOWN_CLASS) {
+ fprintf(stderr, "%s: UNKNOWN animation class\n", path);
+ }
+ else {
+ fprintf(stderr, "%s: animation class %d is not supported yet for transformation type %d\n", path, animclass, type);
+ }
+}
+
// return true to indicate that mat contains a sane value
bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float mat[4][4], float fra, const char *node_id)
{
@@ -1741,11 +1753,6 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
break;
}
- if (animclass == COLLADAFW::AnimationList::UNKNOWN_CLASS) {
- fprintf(stderr, "%s: UNKNOWN animation class\n", path);
- //continue;
- }
-
if (type == COLLADAFW::Transformation::ROTATE) {
if (curves.size() != 1) {
fprintf(stderr, "expected 1 curve, got %d\n", (int)curves.size());
@@ -1754,7 +1761,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
// TODO support other animclasses
if (animclass != COLLADAFW::AnimationList::ANGLE) {
- fprintf(stderr, "%s: animation class %d is not supported yet\n", path, animclass);
+ report_class_type_unsupported(path, animclass, type);
return false;
}
@@ -1793,7 +1800,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
vec[2] = evaluate_fcurve(curves[2], fra);
break;
default:
- fprintf(stderr, "%s: animation class %d is not supported yet\n", path, animclass);
+ report_class_type_unsupported(path, animclass, type);
break;
}
}