diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-04 01:44:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-04 01:44:39 +0300 |
commit | dba1904f657ab9b90aaea3ceed6dad97ec4ad951 (patch) | |
tree | ff8dba823a4b34766d4d88d224221877cd311daa /source/blender/collada | |
parent | ce3b49742decf64b3cb600dd2091feac07330b7b (diff) |
bugfix [#24518] Blender wont compile with -Wall -Werror and COLLADA support
fix included in report from Martijn Berger (mberger)
made some small changes.
- use ints rather then unsigned long for printing, values are not likely to be very large.
- CMake remove strict flags from collada build dir since I had warnings in the collada headers.
- added xml2 to collada libraries else I couldnt get collada building.
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 14 | ||||
-rw-r--r-- | source/blender/collada/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/MeshImporter.h | 4 |
5 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index a79bf3ebaa7..c7267bd46f8 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -131,7 +131,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) } break; default: - fprintf(stderr, "Output dimension of %d is not yet supported (animation id = %s)\n", dim, curve->getOriginalId().c_str()); + fprintf(stderr, "Output dimension of %d is not yet supported (animation id = %s)\n", (int)dim, curve->getOriginalId().c_str()); } for (std::vector<FCurve*>::iterator it = fcurves.begin(); it != fcurves.end(); it++) @@ -221,7 +221,7 @@ AnimationImporter::~AnimationImporter() free_fcurve(*it); if (unused_curves.size()) - fprintf(stderr, "removed %u unused curves\n", unused_curves.size()); + fprintf(stderr, "removed %d unused curves\n", (int)unused_curves.size()); } bool AnimationImporter::write_animation(const COLLADAFW::Animation* anim) @@ -564,7 +564,7 @@ Object *AnimationImporter::translate_animation(COLLADAFW::Node *node, } } else { - fprintf(stderr, "expected %d curves, got %u\n", xyz ? 3 : 1, curves.size()); + fprintf(stderr, "expected %d curves, got %d\n", xyz ? 3 : 1, (int)curves.size()); } } } @@ -902,7 +902,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float if (type == COLLADAFW::Transformation::ROTATE) { if (curves.size() != 1) { - fprintf(stderr, "expected 1 curve, got %u\n", curves.size()); + fprintf(stderr, "expected 1 curve, got %d\n", (int)curves.size()); return false; } @@ -924,9 +924,9 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float if ((!is_xyz && curves.size() != 1) || (is_xyz && curves.size() != 3)) { if (is_xyz) - fprintf(stderr, "%s: expected 3 curves, got %u\n", path, curves.size()); + fprintf(stderr, "%s: expected 3 curves, got %d\n", path, (int)curves.size()); else - fprintf(stderr, "%s: expected 1 curve, got %u\n", path, curves.size()); + fprintf(stderr, "%s: expected 1 curve, got %d\n", path, (int)curves.size()); return false; } @@ -953,7 +953,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float else if (type == COLLADAFW::Transformation::MATRIX) { // for now, of matrix animation, support only the case when all values are packed into one animation if (curves.size() != 16) { - fprintf(stderr, "%s: expected 16 curves, got %u\n", path, curves.size()); + fprintf(stderr, "%s: expected 16 curves, got %d\n", path, (int)curves.size()); return false; } diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index bcc407b6b68..98d9780a92e 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -24,6 +24,8 @@ # # ***** END GPL LICENSE BLOCK ***** +REMOVE_STRICT_FLAGS() + SET(INC . ../blenlib diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index 9062bd4ba9f..66a0b0cbdd4 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -904,7 +904,7 @@ protected: void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename) { PointerRNA sceneptr, unit_settings; - PropertyRNA *system, *scale; + PropertyRNA *system; /* unused , *scale; */ clear_global_id_map(); diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index bc5653c8c45..86609d11c02 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -219,7 +219,7 @@ public: if (libnode_ob.size()) { Scene *sce = CTX_data_scene(mContext); - fprintf(stderr, "got %u library nodes to free\n", libnode_ob.size()); + fprintf(stderr, "got %d library nodes to free\n", (int)libnode_ob.size()); // free all library_nodes std::vector<Object*>::iterator it; for (it = libnode_ob.begin(); it != libnode_ob.end(); it++) { diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h index 055c4798855..c5ab6e94561 100644 --- a/source/blender/collada/MeshImporter.h +++ b/source/blender/collada/MeshImporter.h @@ -72,6 +72,8 @@ class MeshImporter : public MeshImporterBase { private: + UnitConverter *unitconverter; + Scene *scene; ArmatureImporter *armature_importer; @@ -120,8 +122,6 @@ private: bool flat_face(unsigned int *nind, COLLADAFW::MeshVertexData& nor, int count); - UnitConverter *unitconverter; - public: MeshImporter(UnitConverter *unitconv, ArmatureImporter *arm, Scene *sce); |