Merge branch 'Assimp_Settings' of https://github.com/OTHGMars/Torque3D into Preview4_0

This commit is contained in:
Areloch 2019-05-25 01:08:16 -05:00
commit ef226f6a65
25 changed files with 4541 additions and 1508 deletions

View file

@ -81,6 +81,13 @@ namespace ColladaUtils
NumLodTypes
};
enum eAnimTimingType
{
FrameCount = 0,
Seconds = 1,
Milliseconds = 1000
};
domUpAxisType upAxis; // Override for the collada <up_axis> element
F32 unit; // Override for the collada <unit> element
eLodType lodType; // LOD type option
@ -97,6 +104,22 @@ namespace ColladaUtils
bool forceUpdateMaterials; // Force update of materials.cs
bool useDiffuseNames; // Use diffuse texture as the material name
// Assimp specific preprocess import options
bool convertLeftHanded; // Convert to left handed coordinate system.
bool calcTangentSpace; // Calculate tangents and bitangents, if possible.
bool genUVCoords; // Convert spherical, cylindrical, box and planar mapping to proper UVs.
bool transformUVCoords; // Preprocess UV transformations (scaling, translation ...)
bool flipUVCoords; // This step flips all UV coordinates along the y-axis and adjusts material settings
// and bitangents accordingly.\nAssimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0).
bool findInstances; // Search for instanced meshes and remove them by references to one master.
bool limitBoneWeights; // Limit bone weights to 4 per vertex.
bool joinIdenticalVerts; // Identifies and joins identical vertex data sets within all imported meshes.
bool reverseWindingOrder; // This step adjusts the output face winding order to be clockwise. The default face winding order is counter clockwise.
bool invertNormals; // Reverse the normal vector direction for all normals.
bool removeRedundantMats; // Removes redundant materials.
eAnimTimingType animTiming; // How to import timing data as frames, seconds or milliseconds
S32 animFPS; // FPS value to use if timing is set in frames and the animations does not have an fps set
ImportOptions()
{
reset();
@ -119,6 +142,20 @@ namespace ColladaUtils
adjustFloor = false;
forceUpdateMaterials = false;
useDiffuseNames = false;
convertLeftHanded = false;
calcTangentSpace = false;
genUVCoords = false;
transformUVCoords = false;
flipUVCoords = true;
findInstances = false;
limitBoneWeights = false;
joinIdenticalVerts = true;
reverseWindingOrder = true;
invertNormals = false;
removeRedundantMats = true;
animTiming = Seconds;
animFPS = 30;
}
};