Fix incorrect FBX connection order (#6421)
PR #6120 fixed a macro which previously prevented std::unordered_multimap from being used during FBX import when compiled with GCC. This caused FBX::Element properties to be stored in arbitrary order, but the order of connections ("C" properties) in FBX files matters. The main issue I saw was incorrect materials. This changes the type of FBX::ElementMap to always use std::multimap (i.e., ordered). This was the behavior for years under GCC while the broken macro was in use. Unordered containers are still used elsewhere in the FBX importer to benefit from their performance. Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
@@ -64,7 +64,7 @@ class Parser;
|
||||
class Element;
|
||||
|
||||
using ScopeList = std::vector<Scope*>;
|
||||
using ElementMap = std::fbx_unordered_multimap< std::string, Element*>;
|
||||
using ElementMap = std::multimap< std::string, Element*>;
|
||||
using ElementCollection = std::pair<ElementMap::const_iterator,ElementMap::const_iterator>;
|
||||
|
||||
#define new_Scope new (allocator.Allocate(sizeof(Scope))) Scope
|
||||
|
||||
Reference in New Issue
Block a user