mirror of https://github.com/AxioDL/metaforce.git
Fix for extracting animations which animate undefined bones
This commit is contained in:
parent
c8765bc1b9
commit
c9a38c567f
|
@ -19,8 +19,12 @@ void ANIM::IANIM::sendANIMToBlender(hecl::blender::PyOutStream& os, const DNAANI
|
||||||
|
|
||||||
for (const std::pair<atUint32, bool>& bone : bones) {
|
for (const std::pair<atUint32, bool>& bone : bones) {
|
||||||
const std::string* bName = rig.getCINF().getBoneNameFromId(bone.first);
|
const std::string* bName = rig.getCINF().getBoneNameFromId(bone.first);
|
||||||
if (!bName)
|
if (!bName) {
|
||||||
|
++kit;
|
||||||
|
if (bone.second)
|
||||||
|
++kit;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
os.format("bone_string = '%s'\n", bName->c_str());
|
os.format("bone_string = '%s'\n", bName->c_str());
|
||||||
os << "action_group = act.groups.new(bone_string)\n"
|
os << "action_group = act.groups.new(bone_string)\n"
|
||||||
|
|
|
@ -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) {
|
for (const std::pair<atUint32, std::tuple<bool, bool, bool>>& bone : bones) {
|
||||||
const std::string* bName = rig.getCINF().getBoneNameFromId(bone.first);
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
os.format("bone_string = '%s'\n", bName->c_str());
|
os.format("bone_string = '%s'\n", bName->c_str());
|
||||||
os << "action_group = act.groups.new(bone_string)\n"
|
os << "action_group = act.groups.new(bone_string)\n"
|
||||||
|
|
Loading…
Reference in New Issue