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:
authorCampbell Barton <ideasman42@gmail.com>2011-11-11 17:09:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-11 17:09:14 +0400
commite84c0980a3afb89301f8512acee64e525db3a49d (patch)
tree8700c1b43e1887ad8916c623b1f5066bc6b6f17f /source/blender/collada/ArmatureImporter.cpp
parent094c9799f9926ae37515a1fe0380403ce3298a77 (diff)
correct indentation and some whitespace edits (no functional changes)
Diffstat (limited to 'source/blender/collada/ArmatureImporter.cpp')
-rw-r--r--source/blender/collada/ArmatureImporter.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 7e9634da21d..bababf880a6 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -112,8 +112,7 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
bone->roll=angle;
// set head
copy_v3_v3(bone->head, mat[3]);
-
-
+
// set tail, don't set it to head because 0-length bones are not allowed
float vec[3] = {0.0f, 0.5f, 0.0f};
add_v3_v3v3(bone->tail, bone->head, vec);
@@ -427,7 +426,7 @@ void ArmatureImporter::create_armature_bones( )
TODO:
check if bones have already been created for a given joint
*/
- leaf_bone_length = FLT_MAX;
+ leaf_bone_length = FLT_MAX;
create_unskinned_bone(*ri, NULL, (*ri)->getChildNodes().getCount(), NULL, ob_arm);
fix_leaf_bones();
@@ -593,17 +592,16 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
}
else {
copy_m4_m4(mat, obmat);
- float invObmat[4][4];
- invert_m4_m4(invObmat, ob_arm->obmat);
- mul_m4_m4m4(pchan->pose_mat, mat, invObmat);
-
+ float invObmat[4][4];
+ invert_m4_m4(invObmat, ob_arm->obmat);
+ mul_m4_m4m4(pchan->pose_mat, mat, invObmat);
}
-
- mat4_to_axis_angle(ax,&angle,mat);
- pchan->bone->roll = angle;
-
- COLLADAFW::NodePointerArray& children = root_node->getChildNodes();
+ mat4_to_axis_angle(ax,&angle,mat);
+ pchan->bone->roll = angle;
+
+
+ COLLADAFW::NodePointerArray& children = root_node->getChildNodes();
for (unsigned int i = 0; i < children.getCount(); i++) {
set_pose(ob_arm, children[i], bone_name, mat);
}
@@ -762,8 +760,8 @@ Object *ArmatureImporter::get_armature_for_joint(COLLADAFW::Node *node)
if (skin.uses_joint_or_descendant(node))
return skin.get_armature();
}
-
- std::map<COLLADAFW::UniqueId, Object*>::iterator arm;
+
+ std::map<COLLADAFW::UniqueId, Object*>::iterator arm;
for (arm = unskinned_armature_map.begin(); arm != unskinned_armature_map.end(); arm++) {
if(arm->first == node->getUniqueId() )
return arm->second;