2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 02:27:43 +00:00

Templated BabeDead reader

This commit is contained in:
Jack Andersen
2015-09-27 19:19:31 -10:00
parent 739c31d87c
commit 6d1fb5470f
6 changed files with 102 additions and 136 deletions

View File

@@ -32,9 +32,13 @@ struct CINF : DNAMP2::CINF
"arm_bone_table[%u] = bone\n", getBoneNameFromId(bone.id)->c_str(),
bone.origin.vec[0], bone.origin.vec[1], bone.origin.vec[2], bone.id);
for (const Bone& bone : bones)
if (bone.parentId != 97 && bone.parentId != 147)
os.format("arm_bone_table[%u].parent = arm_bone_table[%u]\n", bone.id, bone.parentId);
if (bones.size())
{
atUint32 nullId = bones[0].parentId;
for (const Bone& bone : bones)
if (bone.parentId != nullId)
os.format("arm_bone_table[%u].parent = arm_bone_table[%u]\n", bone.id, bone.parentId);
}
os << "bpy.ops.object.mode_set(mode='OBJECT')\n";
}