Fix for extracting animations which animate undefined bones

This commit is contained in:
Jack Andersen 2019-01-29 11:36:43 -10:00
parent c8765bc1b9
commit c9a38c567f
2 changed files with 13 additions and 2 deletions

View File

@ -19,8 +19,12 @@ void ANIM::IANIM::sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANI
for (const std::pair<atUint32, bool>& bone : bones) {
const std::string* bName = rig.getCINF().getBoneNameFromId(bone.first);
if (!bName)
if (!bName) {
++kit;
if (bone.second)
++kit;
continue;
}
os.format("bone_string = '%s'\n", bName->c_str());
os << "action_group = act.groups.new(bone_string)\n"

View File

@ -18,8 +18,15 @@ void ANIM::IANIM::sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANI
for (const std::pair<atUint32, std::tuple<bool, bool, bool>>& bone : bones) {
const std::string* bName = rig.getCINF().getBoneNameFromId(bone.first);
if (!bName)
if (!bName) {
if (std::get<0>(bone.second))
++kit;
if (std::get<1>(bone.second))
++kit;
if (std::get<2>(bone.second))
++kit;
continue;
}
os.format("bone_string = '%s'\n", bName->c_str());
os << "action_group = act.groups.new(bone_string)\n"