diff --git a/src/base/io_format.cpp b/src/base/io_format.cpp index b7505b3d..fdbee9c8 100644 --- a/src/base/io_format.cpp +++ b/src/base/io_format.cpp @@ -32,6 +32,7 @@ std::string_view formatIdentifier(Format format) case Format_COLLADA: return "COLLADA"; case Format_FBX: return "FBX"; case Format_X3D: return "X3D"; + case Format_DirectX: return "X"; case Format_Blender: return "Blender"; } @@ -59,6 +60,7 @@ std::string_view formatName(Format format) case Format_COLLADA: return "COLLAborative Design Activity(ISO/PAS 17506)"; case Format_FBX: return "Filmbox"; case Format_X3D: return "Extensible 3D Graphics(ISO/IEC 19775/19776/19777)"; + case Format_DirectX: return "DirectX File Format"; case Format_Blender: return "Blender File Format"; } @@ -84,6 +86,7 @@ Span formatFileSuffixes(Format format) static std::string_view suffix_stl[] = { "stl" }; static std::string_view suffix_vrml[] = { "wrl", "wrz", "vrml" }; static std::string_view suffix_x3d[] = { "x3d", "x3dv", "x3db", "x3dz", "x3dbz", "x3dvz" }; + static std::string_view suffix_directx[] = { "x" }; static std::string_view suffix_blender[] = { "blend", "blender", "blend1", "blend2" }; switch (format) { @@ -105,6 +108,7 @@ Span formatFileSuffixes(Format format) case Format_STL: return suffix_stl; case Format_VRML: return suffix_vrml; case Format_X3D: return suffix_x3d; + case Format_DirectX: return suffix_directx; case Format_Blender: return suffix_blender; } diff --git a/src/base/io_format.h b/src/base/io_format.h index 081e746e..d1fed8c4 100644 --- a/src/base/io_format.h +++ b/src/base/io_format.h @@ -32,6 +32,7 @@ enum Format { Format_STL, Format_VRML, Format_X3D, + Format_DirectX, Format_Blender }; diff --git a/src/io_assimp/io_assimp.cpp b/src/io_assimp/io_assimp.cpp index 8c03831c..0cf81af8 100644 --- a/src/io_assimp/io_assimp.cpp +++ b/src/io_assimp/io_assimp.cpp @@ -15,7 +15,14 @@ namespace IO { Span AssimpFactoryReader::formats() const { static const Format array[] = { - Format_AMF, Format_3DS, Format_3MF, Format_COLLADA, Format_FBX, Format_X3D, Format_Blender + Format_AMF, + Format_3DS, + Format_3MF, + Format_COLLADA, + Format_FBX, + Format_X3D, + Format_Blender, + Format_DirectX }; return array; } diff --git a/src/io_assimp/io_assimp_reader.cpp b/src/io_assimp/io_assimp_reader.cpp index 01400547..92a9ae82 100644 --- a/src/io_assimp/io_assimp_reader.cpp +++ b/src/io_assimp/io_assimp_reader.cpp @@ -524,8 +524,10 @@ Handle(XCAFDoc_VisMaterial) AssimpReader::createOccVisMaterial( this->messenger()->trace() << "AI_MATKEY_SPECULAR_FACTOR: " << factor; #endif +#if 0 // Emmissive color disabled as it's making models in Mayo to be rendered nearly with white color if (fnGetColor4D(AI_MATKEY_COLOR_EMISSIVE, &color, &matCommon.IsDefined)) matCommon.EmissiveColor = toOccColor(color); +#endif } {