forked from bartvdbraak/blender
export bone transform matrix with sid.
This commit is contained in:
parent
60eec89cda
commit
cbec4e2768
@ -586,7 +586,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
|
|||||||
|
|
||||||
addSampler(sampler);
|
addSampler(sampler);
|
||||||
|
|
||||||
std::string target = translate_id(ob_name + "_" + bone_name) + "/transform";
|
std::string target = translate_id(bone_name) + "/transform";
|
||||||
addChannel(COLLADABU::URI(empty, sampler_id), target);
|
addChannel(COLLADABU::URI(empty, sampler_id), target);
|
||||||
|
|
||||||
closeAnimation();
|
closeAnimation();
|
||||||
|
@ -48,8 +48,13 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[][4],
|
|||||||
copy_m4_m4(local, mat);
|
copy_m4_m4(local, mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double dmat[4][4];
|
||||||
|
for ( int i = 0 ; i< 4 ; i ++ )
|
||||||
|
for ( int j =0 ; j < 4 ; j++)
|
||||||
|
dmat[i][j] = (double)local[i][j];
|
||||||
|
|
||||||
TransformBase::decompose(local, loc, rot, NULL, scale);
|
TransformBase::decompose(local, loc, rot, NULL, scale);
|
||||||
|
node.addMatrix("transform",dmat);
|
||||||
add_transform(node, loc, rot, scale);
|
add_transform(node, loc, rot, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user