1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0031816: Data Exchange - RWMesh_MaterialMap::CopyTexture() copies glb file instead of a texture inside it

Image_Texture is now checked if it defines an additional offset within the file
to avoided copying an old glb file with embedded image files instead of extracting them.
This commit is contained in:
kgv
2020-10-01 15:07:46 +03:00
committed by bugmaster
parent e6c8fcfed4
commit dba9887351
2 changed files with 22 additions and 1 deletions

View File

@@ -167,7 +167,9 @@ bool RWMesh_MaterialMap::CopyTexture (TCollection_AsciiString& theResTexture,
TCollection_AsciiString aTexFileName;
TCollection_AsciiString aTextureSrc = theTexture->FilePath();
if (!aTextureSrc.IsEmpty())
if (!aTextureSrc.IsEmpty()
&& theTexture->FileOffset() <= 0
&& theTexture->FileLength() <= 0)
{
TCollection_AsciiString aSrcTexFolder;
OSD_Path::FolderAndFileFromPath (aTextureSrc, aSrcTexFolder, aTexFileName);