Fixed many FBX bugs

Fixed a bug where FBX loader won´t load embedded textures that don´t have the Content data filled. Some FBX files only fill this data once, so any embedded texture with the same source filename, should use the pre-loaded data.

Fixed another bug where FBX Texture "Filename" field came different than  on some files than the one defined by the code. One suggestion is load all properties by the case-insensitive function created.

Added the "AI_CONFIG_IMPORT_FBX_SEARCH_EMBEDDED_TEXTURES" flag to tell the importer to load embedded texture data from already loaded ones.
This commit is contained in:
rickomax
2017-07-15 00:27:33 -03:00
parent c9912fd481
commit c86013b08d
6 changed files with 93 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2016, assimp team
Copyright (c) 2006-2017, assimp team
All rights reserved.
@@ -632,8 +632,15 @@ enum aiComponent
#define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \
"IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
// ---------------------------------------------------------------------------
/** @brief Set whether the fbx importer will search for embedded loaded textures, where no embedded texture data is provided.
*
* The default value is false (0)
* Property type: bool
*/
#define AI_CONFIG_IMPORT_FBX_SEARCH_EMBEDDED_TEXTURES \
"IMPORT_FBX_SEARCH_EMBEDDED_TEXTURES"
// ---------------------------------------------------------------------------
/** @brief Set the vertex animation keyframe to be imported
*