mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-07-06 02:05:22 +08:00
Merge branch 'master' of github.com:syoyo/tinygltf
This commit is contained in:
commit
16fae080f9
@ -4131,7 +4131,7 @@ static void SerializeExtensionMap(ExtensionMap &extensions, json &o) {
|
|||||||
extMap[extIt->first] = ret;
|
extMap[extIt->first] = ret;
|
||||||
}
|
}
|
||||||
if(ret.is_null()) {
|
if(ret.is_null()) {
|
||||||
if (!(extIt->first.empty())) { // name should not be empty, but for sure
|
if (!(extIt->first.empty())) { // name should not be empty, but for sure
|
||||||
// create empty object so that an extension name is still included in json.
|
// create empty object so that an extension name is still included in json.
|
||||||
extMap[extIt->first] = json({});
|
extMap[extIt->first] = json({});
|
||||||
}
|
}
|
||||||
@ -4442,6 +4442,7 @@ static void SerializeGltfNode(Node &node, json &o) {
|
|||||||
static void SerializeGltfSampler(Sampler &sampler, json &o) {
|
static void SerializeGltfSampler(Sampler &sampler, json &o) {
|
||||||
SerializeNumberProperty("magFilter", sampler.magFilter, o);
|
SerializeNumberProperty("magFilter", sampler.magFilter, o);
|
||||||
SerializeNumberProperty("minFilter", sampler.minFilter, o);
|
SerializeNumberProperty("minFilter", sampler.minFilter, o);
|
||||||
|
SerializeNumberProperty("wrapR", sampler.wrapR, o);
|
||||||
SerializeNumberProperty("wrapS", sampler.wrapS, o);
|
SerializeNumberProperty("wrapS", sampler.wrapS, o);
|
||||||
SerializeNumberProperty("wrapT", sampler.wrapT, o);
|
SerializeNumberProperty("wrapT", sampler.wrapT, o);
|
||||||
|
|
||||||
@ -4627,7 +4628,7 @@ bool TinyGLTF::WriteGltfSceneToFile(Model *model, const std::string &filename,
|
|||||||
} else {
|
} else {
|
||||||
std::string binSavePath;
|
std::string binSavePath;
|
||||||
std::string binUri;
|
std::string binUri;
|
||||||
if (!model->buffers[i].uri.empty()
|
if (!model->buffers[i].uri.empty()
|
||||||
&& !IsDataURI(model->buffers[i].uri)) {
|
&& !IsDataURI(model->buffers[i].uri)) {
|
||||||
binUri = model->buffers[i].uri;
|
binUri = model->buffers[i].uri;
|
||||||
}
|
}
|
||||||
@ -4684,7 +4685,7 @@ bool TinyGLTF::WriteGltfSceneToFile(Model *model, const std::string &filename,
|
|||||||
json image;
|
json image;
|
||||||
|
|
||||||
UpdateImageObject(model->images[i], baseDir, int(i), embedImages,
|
UpdateImageObject(model->images[i], baseDir, int(i), embedImages,
|
||||||
&this->WriteImageData, &this->write_image_user_data_);
|
&this->WriteImageData, this->write_image_user_data_);
|
||||||
SerializeGltfImage(model->images[i], image);
|
SerializeGltfImage(model->images[i], image);
|
||||||
images.push_back(image);
|
images.push_back(image);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user