diff options
Diffstat (limited to 'source/blender/collada/ArmatureExporter.cpp')
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 47d41a9680f..743d3c2a158 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -193,7 +193,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene* sce, while( i != child_objects.end() ) { - if((*i)->partype == PARBONE && (0 == strcmp((*i)->parsubstr, bone->name))) + if ((*i)->partype == PARBONE && (0 == strcmp((*i)->parsubstr, bone->name))) { float backup_parinv[4][4]; copy_m4_m4(backup_parinv, (*i)->parentinv); @@ -210,7 +210,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene* sce, // TODO: when such objects are animated as // single matrix the tweak must be applied // to the result. - if(export_settings->second_life) + if (export_settings->second_life) { // tweak objects parentinverse to match compatibility float temp[4][4]; @@ -274,7 +274,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW: } // SECOND_LIFE_COMPATIBILITY - if(export_settings->second_life) + if (export_settings->second_life) { // Remove rotations vs armature from transform // parent_rest_rot * mat * irest_rot @@ -285,7 +285,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW: mult_m4_m4m4(mat, mat, temp); - if(bone->parent) + if (bone->parent) { copy_m4_m4(temp, bone->parent->arm_mat); temp[3][0] = temp[3][1] = temp[3][2] = 0.0f; @@ -370,18 +370,18 @@ void ArmatureExporter::export_controller(Object* ob, Object *ob_arm) for (j = 0; j < vert->totweight; j++) { int joint_index = joint_index_by_def_index[vert->dw[j].def_nr]; - if(joint_index != -1 && vert->dw[j].weight > 0.0f) + if (joint_index != -1 && vert->dw[j].weight > 0.0f) { jw[joint_index] += vert->dw[j].weight; sumw += vert->dw[j].weight; } } - if(sumw > 0.0f) + if (sumw > 0.0f) { float invsumw = 1.0f/sumw; vcounts.push_back(jw.size()); - for(std::map<int, float>::iterator m = jw.begin(); m != jw.end(); ++m) + for (std::map<int, float>::iterator m = jw.begin(); m != jw.end(); ++m) { joints.push_back((*m).first); weights.push_back(invsumw*(*m).second); @@ -502,7 +502,7 @@ std::string ArmatureExporter::add_inv_bind_mats_source(Object *ob_arm, ListBase float inv_bind_mat[4][4]; // SECOND_LIFE_COMPATIBILITY - if(export_settings->second_life) + if (export_settings->second_life) { // Only translations, no rotation vs armature float temp[4][4]; @@ -560,7 +560,7 @@ std::string ArmatureExporter::add_weights_source(Mesh *me, const std::string& co source.prepareToAppendValues(); - for(std::list<float>::const_iterator i = weights.begin(); i != weights.end(); ++i) { + for (std::list<float>::const_iterator i = weights.begin(); i != weights.end(); ++i) { source.appendValues(*i); } @@ -597,7 +597,7 @@ void ArmatureExporter::add_vertex_weights_element(const std::string& weights_sou // write deformer index - weight index pairs int weight_index = 0; - for(std::list<int>::const_iterator i = joints.begin(); i != joints.end(); ++i) + for (std::list<int>::const_iterator i = joints.begin(); i != joints.end(); ++i) { weightselem.appendValues(*i, weight_index++); } |