Skip to content

Commit

Permalink
Fixed unsupported chunk operation
Browse files Browse the repository at this point in the history
Not break loading process.
  • Loading branch information
mik14a committed May 12, 2018
1 parent db812a4 commit 61cc92e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Source/VOX4UEditor/Private/Vox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,19 @@ bool FVox::Import(FArchive& Ar, const UVoxImportOption* ImportOption)
UE_LOG(LogVox, Verbose, TEXT(" %s"), *Color.ToString());
Palette.Add(Color);
}
} else if (0 == FCStringAnsi::Strncmp("MATT", ChunkId, 4)) {
UE_LOG(LogVox, Warning, TEXT("Unsupported MATT chunk."));
uint8 byte;
for (uint32 i = 0; i < SizeOfChunkContents; ++i) {
Ar << byte;
}
} else {
FString UnknownChunk(ChunkId);
UE_LOG(LogVox, Error, TEXT("Unknown chunk. [ %s ]"), *UnknownChunk);
break;
UE_LOG(LogVox, Warning, TEXT("Unsupported chunk [ %s ]. Skipping %d byte of chunk contents."), *UnknownChunk, SizeOfChunkContents);
uint8 byte;
for (uint32 i = 0; i < SizeOfChunkContents; ++i) {
Ar << byte;
}
}
} while (!Ar.AtEnd());

Expand Down

0 comments on commit 61cc92e

Please sign in to comment.