ANIM Scaling fix

This commit is contained in:
Jack Andersen 2015-09-27 14:42:47 -10:00
parent a18f1aae6e
commit 3540a3e19a
5 changed files with 7 additions and 4 deletions

View File

@ -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:

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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);

View File

@ -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);