Skip to content

Commit

Permalink
Merge branch 'feature/#273' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
HuguesDelorme committed Apr 18, 2024
2 parents afec287 + f051a9a commit 31fb493
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/base/io_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down Expand Up @@ -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";
}

Expand All @@ -84,6 +86,7 @@ Span<std::string_view> 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) {
Expand All @@ -105,6 +108,7 @@ Span<std::string_view> 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;
}

Expand Down
1 change: 1 addition & 0 deletions src/base/io_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum Format {
Format_STL,
Format_VRML,
Format_X3D,
Format_DirectX,
Format_Blender
};

Expand Down
9 changes: 8 additions & 1 deletion src/io_assimp/io_assimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ namespace IO {
Span<const Format> 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;
}
Expand Down
2 changes: 2 additions & 0 deletions src/io_assimp/io_assimp_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

{
Expand Down

0 comments on commit 31fb493

Please sign in to comment.