diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-05 23:27:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-05 23:27:21 +0400 |
commit | a6d9a5a972595c898e596deb95eb683430621188 (patch) | |
tree | 0d51b5391d831c16aa7108095e6b5b1380d918ff /source/blender/collada | |
parent | 76ddf6d2ee97bf51290492d4c692dd8ca031182c (diff) |
Code cleanup: warning fixes.
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 8 | ||||
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 11 | ||||
-rw-r--r-- | source/blender/collada/AnimationImporter.h | 4 | ||||
-rw-r--r-- | source/blender/collada/ArmatureImporter.cpp | 5 | ||||
-rw-r--r-- | source/blender/collada/DocumentImporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/TransformReader.cpp | 1 |
6 files changed, 11 insertions, 22 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 4c20d1cf6c1..498ccb5709d 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -643,6 +643,8 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti case COLLADASW::InputSemantic::OUT_TANGENT: source.setAccessorStride(2); break; + default: + break; } @@ -913,7 +915,7 @@ std::string AnimationExporter::get_light_param_sid(char *rna_path, int tm_type, } if (tm_name.size()) { - if (axis_name != "") + if (axis_name[0]) return tm_name + "." + std::string(axis_name); else return tm_name; @@ -962,7 +964,7 @@ std::string AnimationExporter::get_camera_param_sid(char *rna_path, int tm_type, } if (tm_name.size()) { - if (axis_name != "") + if (axis_name[0]) return tm_name + "." + std::string(axis_name); else return tm_name; @@ -1041,7 +1043,7 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co if (is_rotation) return tm_name + std::string(axis_name) + ".ANGLE"; else - if (axis_name != "") + if (axis_name[0]) return tm_name + "." + std::string(axis_name); else return tm_name; diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 29c356ed8f0..43428f57d4f 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -90,12 +90,6 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) COLLADAFW::FloatOrDoubleArray& input = curve->getInputValues(); COLLADAFW::FloatOrDoubleArray& output = curve->getOutputValues(); - if( curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER || - curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_STEP ) { - COLLADAFW::FloatOrDoubleArray& intan = curve->getInTangentValues(); - COLLADAFW::FloatOrDoubleArray& outtan = curve->getOutTangentValues(); - } - float fps = (float)FPS; size_t dim = curve->getOutDimension(); unsigned int i; @@ -572,7 +566,7 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation * } //creates the rna_paths and array indices of fcurves from animations using color and bound animation class of each animation. -void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type) +void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,const char * anim_type) { char rna_path[100]; BLI_strncpy(rna_path,anim_type, sizeof(rna_path)); @@ -615,7 +609,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list } -void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type) +void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type) { char rna_path[100]; if (animlist_map.find(listid) == animlist_map.end()) return ; @@ -803,7 +797,6 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , } bAction * act; - bActionGroup *grp = NULL; if ( (animType->transform) != 0 ) { diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index ed9a2171c87..9e8f7b42069 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -159,8 +159,8 @@ public: const COLLADAFW::AnimationList::AnimationBinding * binding, std::vector<FCurve*>* curves, bool is_joint, char * joint_path); - void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type); - void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type); + void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type); + void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type); int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition); diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 27aee133557..19fa54c5044 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -95,8 +95,6 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p EditBone *bone = ED_armature_edit_bone_add((bArmature*)ob_arm->data, (char*)bc_get_joint_name(node)); totbone++; - bPoseChannel *pchan = get_pose_channel(ob_arm->pose, (char*)bc_get_joint_name(node)); - if (parent) bone->parent = parent; float angle = 0; @@ -280,8 +278,6 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW: copy_m4_m4(leaf.mat, mat); BLI_strncpy(leaf.name, bone->name, sizeof(leaf.name)); - float vec[3]; - TagsMap::iterator etit; ExtraTags *et = 0; etit = uid_tags_map.find(node->getUniqueId().toAscii()); @@ -579,7 +575,6 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node float mat[4][4]; float obmat[4][4]; - bArmature * arm = (bArmature * ) ob_arm-> data ; float ax[3]; float angle = NULL; diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 1a91e185bac..586c6ccfe82 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -240,15 +240,15 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW root_map[node->getUniqueId()] = root_map[par->getUniqueId()]; } - COLLADAFW::Transformation::TransformationType types[] = { + /*COLLADAFW::Transformation::TransformationType types[] = { COLLADAFW::Transformation::ROTATE, COLLADAFW::Transformation::SCALE, COLLADAFW::Transformation::TRANSLATE, COLLADAFW::Transformation::MATRIX }; + Object *ob;*/ unsigned int i; - Object *ob; //for (i = 0; i < 4; i++) //ob = diff --git a/source/blender/collada/TransformReader.cpp b/source/blender/collada/TransformReader.cpp index 0fd0c85aa09..625a0220830 100644 --- a/source/blender/collada/TransformReader.cpp +++ b/source/blender/collada/TransformReader.cpp @@ -37,7 +37,6 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m { float cur[4][4]; float copy[4][4]; - float eul[3]; unit_m4(mat); |