message: Fix for samplers being written out with default values and writing 0 in filter fields if no filter value was read
diff: @@ -749,15 +749,31 @@ static std::string decodeUri(const char* uri)
  void writeSampler(std::string& json, const cgltf_sampler& sampler)
  {
  + if (sampler.mag_filter != 0)
  + {
  + comma(json);
  append(json, "\"magFilter\":");
  append(json, size_t(sampler.mag_filter));
  - append(json, ",\"minFilter\":");
  + }
  + if (sampler.min_filter != 0)
  + {
  + comma(json);
  + append(json, "\"minFilter\":");
  append(json, size_t(sampler.min_filter));
  - append(json, ",\"wrapS\":");
  + }
  + if (sampler.wrap_s != 10497)
  + {
  + comma(json);
  + append(json, "\"wrapS\":");
  append(json, size_t(sampler.wrap_s));
  - append(json, ",\"wrapT\":");
  + }
  + if (sampler.wrap_t != 10497)
  + {
  + comma(json);
  + append(json, "\"wrapT\":");
  append(json, size_t(sampler.wrap_t));
  }
  +}
  void writeImage(std::string& json, std::vector<BufferView>& views, const cgltf_image& image, const ImageInfo& info, size_t index, const char* input_path, const char* output_path, const Settings& settings)
  {
  