Name the gltf2 buffer uniquely.
This commit is contained in:
parent
7063185f9f
commit
e76d5c2d99
|
@ -399,7 +399,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
assert(!outputFolder.empty());
|
||||
|
||||
const std::string binaryPath = outputFolder + extBufferFilename;
|
||||
const std::string binaryPath = outputFolder + FileUtils::GetFileBase(gltfOptions.inputPath) + extBufferFilename;
|
||||
FILE* fp = fopen(binaryPath.c_str(), "wb");
|
||||
if (fp == nullptr) {
|
||||
fmt::fprintf(stderr, "ERROR:: Couldn't open file '%s' for writing.\n", binaryPath);
|
||||
|
|
|
@ -230,6 +230,6 @@ class GltfModel {
|
|||
}
|
||||
BufferData* buildDefaultBuffer(const GltfOptions& options) {
|
||||
return options.outputBinary ? new BufferData(binary)
|
||||
: new BufferData(extBufferFilename, binary, options.embedResources);
|
||||
: new BufferData(FileUtils::GetFileBase(options.inputPath) + extBufferFilename, binary, options.embedResources);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue