mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 20:40:35 +00:00
Import settings persistence
Adds new settings to ColladaUtils::ImportSettings and TSShapeConstructor::ImportSettings for persistence. Shape will now be re-imported with the original settings if the source art is newer or the cached.dts file has been deleted. Fixes material transparency blend mode assignment. Adds implementation for override scale, material prefix and always/never import options. Reads and applies metadata fields for scale and up axis from formats that provide it. Eliminates the assimp.log file and redirects log messages to console.log. Verbose logging is enabled in debug builds.
This commit is contained in:
parent
45f631b5e5
commit
2eaa917e00
10 changed files with 575 additions and 141 deletions
|
|
@ -79,7 +79,7 @@ void AssimpAppMesh::lockMesh(F32 t, const MatrixF& objOffset)
|
|||
uvs.reserve(mMeshData->mNumVertices);
|
||||
normals.reserve(mMeshData->mNumVertices);
|
||||
|
||||
bool flipNormals = Con::getBoolVariable("$Assimp::FlipNormals", false);
|
||||
bool flipNormals = ColladaUtils::getOptions().invertNormals;
|
||||
|
||||
bool noUVFound = false;
|
||||
for (U32 i = 0; i<mMeshData->mNumVertices; i++)
|
||||
|
|
@ -203,14 +203,17 @@ void AssimpAppMesh::lockMesh(F32 t, const MatrixF& objOffset)
|
|||
MatrixF boneTransform;
|
||||
AssimpAppNode::assimpToTorqueMat(mMeshData->mBones[b]->mOffsetMatrix, boneTransform);
|
||||
Point3F boneScale = boneTransform.getScale();
|
||||
if (boneScale != Point3F::One)
|
||||
Point3F bonePos = boneTransform.getPosition();
|
||||
if (boneScale != Point3F::One && ColladaUtils::getOptions().ignoreNodeScale)
|
||||
{
|
||||
Point3F scaleMult = Point3F::One / boneScale;
|
||||
Point3F scalePos = boneTransform.getPosition();
|
||||
boneTransform.scale(scaleMult);
|
||||
scalePos /= scaleMult;
|
||||
boneTransform.setPosition(scalePos);
|
||||
bonePos /= scaleMult;
|
||||
}
|
||||
|
||||
bonePos *= ColladaUtils::getOptions().unit;
|
||||
boneTransform.setPosition(bonePos);
|
||||
|
||||
initialTransforms.push_back(boneTransform);
|
||||
|
||||
//Weights
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue