From c1eedbba8ea882812cdf38b99f3823c4dc39a065 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 12 Mar 2025 11:05:37 +0100 Subject: [PATCH] Fix: Let OpenGEX accept color3 types (#6040) - will set alpha channel to 1.0f, if no alpha channel was found. - closes https://github.com/assimp/assimp/issues/6039 --- code/AssetLib/OpenGEX/OpenGEXImporter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/AssetLib/OpenGEX/OpenGEXImporter.cpp b/code/AssetLib/OpenGEX/OpenGEXImporter.cpp index 6870eb8e9..9170f1bd3 100644 --- a/code/AssetLib/OpenGEX/OpenGEXImporter.cpp +++ b/code/AssetLib/OpenGEX/OpenGEXImporter.cpp @@ -783,10 +783,10 @@ static void fillColor4(aiColor4D *col4, Value *vals) { col4->b = next->getFloat(); next = next->m_next; if (!next) { - throw DeadlyImportError("OpenGEX: Not enough values to fill 4-element color, only 3"); + col4->a = 1.0f; + } else { + col4->a = next->getFloat(); } - - col4->a = next->getFloat(); } //------------------------------------------------------------------------------------------------