mirror of https://github.com/AxioDL/metaforce.git
ANIM Scaling fix
This commit is contained in:
parent
a18f1aae6e
commit
3540a3e19a
|
@ -166,7 +166,7 @@ BitstreamReader::read(const atUint8* data,
|
||||||
}
|
}
|
||||||
case Channel::SCALE:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case Channel::KF_HEAD:
|
case Channel::KF_HEAD:
|
||||||
|
@ -217,7 +217,7 @@ BitstreamReader::read(const atUint8* data,
|
||||||
p[0] += dequantize(data, chan.q[0]);
|
p[0] += dequantize(data, chan.q[0]);
|
||||||
p[1] += dequantize(data, chan.q[1]);
|
p[1] += dequantize(data, chan.q[1]);
|
||||||
p[2] += dequantize(data, chan.q[2]);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case Channel::KF_HEAD:
|
case Channel::KF_HEAD:
|
||||||
|
|
|
@ -555,9 +555,9 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
||||||
pos.vec[0], pos.vec[1], pos.vec[2]);
|
pos.vec[0], pos.vec[1], pos.vec[2]);
|
||||||
if (rp.first)
|
if (rp.first)
|
||||||
{
|
{
|
||||||
if (SurfaceHeader::UseMatrixSkinning())
|
if (SurfaceHeader::UseMatrixSkinning() && !skinIndices.empty())
|
||||||
rp.first->weightVertex(os, *rp.second, skinIndices[i]);
|
rp.first->weightVertex(os, *rp.second, skinIndices[i]);
|
||||||
else
|
else if (!SurfaceHeader::UseMatrixSkinning())
|
||||||
rp.first->weightVertex(os, *rp.second, i);
|
rp.first->weightVertex(os, *rp.second, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ struct CINF : BigDNA
|
||||||
"bone.head = (%f,%f,%f)\n"
|
"bone.head = (%f,%f,%f)\n"
|
||||||
"bone.tail = bone.head\n"
|
"bone.tail = bone.head\n"
|
||||||
"bone.tail[1] += 0.5\n"
|
"bone.tail[1] += 0.5\n"
|
||||||
|
"bone.use_inherit_scale = False\n"
|
||||||
"arm_bone_table[%u] = bone\n", getBoneNameFromId(bone.id)->c_str(),
|
"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);
|
bone.origin.vec[0], bone.origin.vec[1], bone.origin.vec[2], bone.id);
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ struct CINF : BigDNA
|
||||||
"bone.head = (%f,%f,%f)\n"
|
"bone.head = (%f,%f,%f)\n"
|
||||||
"bone.tail = bone.head\n"
|
"bone.tail = bone.head\n"
|
||||||
"bone.tail[1] += 0.5\n"
|
"bone.tail[1] += 0.5\n"
|
||||||
|
"bone.use_inherit_scale = False\n"
|
||||||
"arm_bone_table[%u] = bone\n", getBoneNameFromId(bone.id)->c_str(),
|
"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);
|
bone.origin.vec[0], bone.origin.vec[1], bone.origin.vec[2], bone.id);
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ struct CINF : DNAMP2::CINF
|
||||||
"bone.head = (%f,%f,%f)\n"
|
"bone.head = (%f,%f,%f)\n"
|
||||||
"bone.tail = bone.head\n"
|
"bone.tail = bone.head\n"
|
||||||
"bone.tail[1] += 0.5\n"
|
"bone.tail[1] += 0.5\n"
|
||||||
|
"bone.use_inherit_scale = False\n"
|
||||||
"arm_bone_table[%u] = bone\n", getBoneNameFromId(bone.id)->c_str(),
|
"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);
|
bone.origin.vec[0], bone.origin.vec[1], bone.origin.vec[2], bone.id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue