mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14: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
|
|
@ -28,6 +28,9 @@
|
|||
#endif
|
||||
#include <assimp/texture.h>
|
||||
|
||||
class GuiTreeViewCtrl;
|
||||
struct aiNode;
|
||||
struct aiMetadata;
|
||||
//-----------------------------------------------------------------------------
|
||||
class AssimpShapeLoader : public TSShapeLoader
|
||||
{
|
||||
|
|
@ -37,9 +40,18 @@ protected:
|
|||
const struct aiScene* mScene;
|
||||
|
||||
virtual bool ignoreNode(const String& name);
|
||||
virtual bool ignoreMesh(const String& name);
|
||||
void detectDetails();
|
||||
void extractTexture(U32 index, aiTexture* pTex);
|
||||
|
||||
private:
|
||||
void addNodeToTree(S32 parentItem, aiNode* node, GuiTreeViewCtrl* tree, U32& nodeCount);
|
||||
void addMetaDataToTree(const aiMetadata* metaData, GuiTreeViewCtrl* tree);
|
||||
bool getMetabool(const char* key, bool& boolVal);
|
||||
bool getMetaInt(const char* key, S32& intVal);
|
||||
bool getMetaFloat(const char* key, F32& floatVal);
|
||||
bool getMetaDouble(const char* key, F64& doubleVal);
|
||||
|
||||
public:
|
||||
AssimpShapeLoader();
|
||||
~AssimpShapeLoader();
|
||||
|
|
@ -51,7 +63,10 @@ public:
|
|||
|
||||
void computeBounds(Box3F& bounds);
|
||||
|
||||
bool fillGuiTreeView(const char* shapePath, GuiTreeViewCtrl* tree);
|
||||
|
||||
static bool canLoadCachedDTS(const Torque::Path& path);
|
||||
static void assimpLogCallback(const char* message, char* user);
|
||||
};
|
||||
|
||||
#endif // _ASSIMP_SHAPELOADER_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue