From 47c373c7a970fa4bd26453a6e35a4b066f2b77e4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Feb 2012 10:35:39 +0000 Subject: style cleanup (mostly whitespace) --- source/blender/collada/AnimationExporter.cpp | 6 +++--- source/blender/collada/AnimationImporter.cpp | 27 +++++++++++++++------------ source/blender/collada/AnimationImporter.h | 2 +- source/blender/collada/TransformWriter.cpp | 4 ++-- 4 files changed, 21 insertions(+), 18 deletions(-) (limited to 'source/blender/collada') diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index c2d8c356aae..b8bd3ab9fd6 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -55,7 +55,7 @@ void AnimationExporter::exportAnimations(Scene *sce) void AnimationExporter::operator() (Object *ob) { FCurve *fcu; - char * transformName ; + char *transformName; /* bool isMatAnim = false; */ /* UNUSED */ //Export transform animations @@ -254,7 +254,7 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa std::string input_id = create_source_from_fcurve(COLLADASW::InputSemantic::INPUT, fcu, anim_id, axis_name); // create output source - std::string output_id ; + std::string output_id; //quat rotations are skipped for now, because of complications with determining axis. if(quatRotation) @@ -302,7 +302,7 @@ void AnimationExporter::dae_animation(Object* ob, FCurve *fcu, char* transformNa addSampler(sampler); - std::string target ; + std::string target; if ( !is_param ) target = translate_id(ob_name) diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index b889dd21177..097e9902de5 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -610,9 +610,10 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list 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 ; - else - { + if (animlist_map.find(listid) == animlist_map.end()) { + return; + } + else { //anim_type has animations const COLLADAFW::AnimationList *animlist = animlist_map[listid]; const COLLADAFW::AnimationList::AnimationBindings& bindings = animlist->getAnimationBindings(); @@ -665,7 +666,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector& } // new curves to assign matrix transform animation FCurve *newcu[10]; // if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale - unsigned int totcu = 10 ; + unsigned int totcu = 10; const char *tm_str = NULL; char rna_path[200]; for (int i = 0; i < totcu; i++) { @@ -824,9 +825,10 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , const COLLADAFW::UniqueId& listid = transform->getAnimationList(); //check if transformation has animations - if (animlist_map.find(listid) == animlist_map.end()) continue ; - else - { + if (animlist_map.find(listid) == animlist_map.end()) { + continue; + } + else { //transformation has animations const COLLADAFW::AnimationList *animlist = animlist_map[listid]; const COLLADAFW::AnimationList::AnimationBindings& bindings = animlist->getAnimationBindings(); @@ -1030,7 +1032,7 @@ void AnimationImporter::add_bone_animation_sampled(Object * ob, std::vectorgetAnimationList(); //check if transformation has animations - if (animlist_map.find(listid) == animlist_map.end()) continue ; - else - { + if (animlist_map.find(listid) == animlist_map.end()) { + continue; + } + else { types->transform = types->transform|NODE_TRANSFORM; break; } @@ -1868,7 +1871,7 @@ void AnimationImporter::add_bezt(FCurve *fcu, float fra, float value) //float fps = (float)FPS; BezTriple bez; memset(&bez, 0, sizeof(BezTriple)); - bez.vec[1][0] = fra ; + bez.vec[1][0] = fra; bez.vec[1][1] = value; bez.ipo = BEZT_IPO_LIN ;/* use default interpolation mode here... */ bez.f1 = bez.f2 = bez.f3 = SELECT; diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index 5fb96017dee..e42a1cc7a55 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -148,7 +148,7 @@ public: std::map& object_map , std::map FW_object_map); - AnimMix* get_animation_type( const COLLADAFW::Node * node , std::map FW_object_map ) ; + AnimMix* get_animation_type( const COLLADAFW::Node * node , std::map FW_object_map ); void apply_matrix_curves( Object * ob, std::vector& animcurves, COLLADAFW::Node* root ,COLLADAFW::Node* node, COLLADAFW::Transformation * tm ); diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp index 0cf26a03107..10a965308b1 100644 --- a/source/blender/collada/TransformWriter.cpp +++ b/source/blender/collada/TransformWriter.cpp @@ -102,8 +102,8 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob) for(int i = 0; i < 16; ++i) { - float f = (i%4 == i/4) ? 1.0f : 0.0f ; - add_parinv |= (ob->parentinv[i%4][i/4] != f); + float f = (i % 4 == i / 4) ? 1.0f : 0.0f; + add_parinv |= (ob->parentinv[i % 4][i / 4] != f); } if(add_parinv) -- cgit v1.2.3