diff --git a/DataSpec/DNACommon/ANIM.cpp b/DataSpec/DNACommon/ANIM.cpp index d352fc08e..1bbe84af3 100644 --- a/DataSpec/DNACommon/ANIM.cpp +++ b/DataSpec/DNACommon/ANIM.cpp @@ -166,7 +166,7 @@ BitstreamReader::read(const atUint8* data, } case Channel::SCALE: { - keys.push_back({chan.i[0] / (float)rotDiv, chan.i[1] / (float)rotDiv, chan.i[2] / (float)rotDiv}); + keys.push_back({chan.i[0] / float(rotDiv), chan.i[1] / float(rotDiv), chan.i[2] / float(rotDiv)}); break; } case Channel::KF_HEAD: @@ -217,7 +217,7 @@ BitstreamReader::read(const atUint8* data, p[0] += dequantize(data, chan.q[0]); p[1] += dequantize(data, chan.q[1]); p[2] += dequantize(data, chan.q[2]); - kit->push_back({p[0] / (float)rotDiv, p[1] / (float)rotDiv, p[2] / (float)rotDiv}); + kit->push_back({p[0] / float(rotDiv), p[1] / float(rotDiv), p[2] / float(rotDiv)}); break; } case Channel::KF_HEAD: diff --git a/DataSpec/DNACommon/CMDL.hpp b/DataSpec/DNACommon/CMDL.hpp index 994a8fc8d..45d52782a 100644 --- a/DataSpec/DNACommon/CMDL.hpp +++ b/DataSpec/DNACommon/CMDL.hpp @@ -555,9 +555,9 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os, pos.vec[0], pos.vec[1], pos.vec[2]); if (rp.first) { - if (SurfaceHeader::UseMatrixSkinning()) + if (SurfaceHeader::UseMatrixSkinning() && !skinIndices.empty()) rp.first->weightVertex(os, *rp.second, skinIndices[i]); - else + else if (!SurfaceHeader::UseMatrixSkinning()) rp.first->weightVertex(os, *rp.second, i); } } diff --git a/DataSpec/DNAMP1/CINF.hpp b/DataSpec/DNAMP1/CINF.hpp index 34f24fd52..181b44575 100644 --- a/DataSpec/DNAMP1/CINF.hpp +++ b/DataSpec/DNAMP1/CINF.hpp @@ -86,6 +86,7 @@ struct CINF : BigDNA "bone.head = (%f,%f,%f)\n" "bone.tail = bone.head\n" "bone.tail[1] += 0.5\n" + "bone.use_inherit_scale = False\n" "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); diff --git a/DataSpec/DNAMP2/CINF.hpp b/DataSpec/DNAMP2/CINF.hpp index 058c72048..95bb4a30a 100644 --- a/DataSpec/DNAMP2/CINF.hpp +++ b/DataSpec/DNAMP2/CINF.hpp @@ -87,6 +87,7 @@ struct CINF : BigDNA "bone.head = (%f,%f,%f)\n" "bone.tail = bone.head\n" "bone.tail[1] += 0.5\n" + "bone.use_inherit_scale = False\n" "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); diff --git a/DataSpec/DNAMP3/CINF.hpp b/DataSpec/DNAMP3/CINF.hpp index 0280e5350..fdb2f4c32 100644 --- a/DataSpec/DNAMP3/CINF.hpp +++ b/DataSpec/DNAMP3/CINF.hpp @@ -28,6 +28,7 @@ struct CINF : DNAMP2::CINF "bone.head = (%f,%f,%f)\n" "bone.tail = bone.head\n" "bone.tail[1] += 0.5\n" + "bone.use_inherit_scale = False\n" "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);