mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 21:24:34 +00:00
Assimp fixes
Should now apply the same corrective fix to modelled bounds
This commit is contained in:
parent
0b73e701ac
commit
887f239a20
4 changed files with 63 additions and 15 deletions
|
|
@ -981,9 +981,19 @@ static bool sReadAssimp(const Torque::Path &path, TSShape*& res_shape)
|
|||
// Allow TSShapeConstructor object to override properties
|
||||
ColladaUtils::getOptions().reset();
|
||||
TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructorByFilename(path.getFullPath());
|
||||
bool autoDetectUpAxis = true;
|
||||
if (tscon)
|
||||
{
|
||||
ColladaUtils::getOptions() = tscon->mOptions;
|
||||
autoDetectUpAxis = (tscon->mOptions.upAxis == UPAXISTYPE_COUNT);
|
||||
}
|
||||
|
||||
AssimpShapeLoader loader;
|
||||
TSShape* tss = loader.generateShape(path);
|
||||
|
||||
if (tscon && autoDetectUpAxis)
|
||||
{
|
||||
tscon->mOptions = ColladaUtils::getOptions();
|
||||
}
|
||||
|
||||
AssimpShapeLoader loader;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue