mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Fix double-quoting of layer metadata in pprinter
Previously, string metadata values were being double-quoted because to_string() for strings already calls quote(). This caused values like "Blender v2.93.0" to be output as ""Blender v2.93.0"". Removed unnecessary quote() calls for registered metadata (doc, comment) since to_string() already handles the quoting. Fixes issue where curves.usda output had `doc = ""Blender v2.93.0""`. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -680,13 +680,13 @@ std::string print_prim_metas(const PrimMeta &meta, const uint32_t indent) {
|
||||
}
|
||||
|
||||
if (meta.doc) {
|
||||
ss << pprint::Indent(indent) << "doc = " << quote(to_string(meta.doc.value()))
|
||||
ss << pprint::Indent(indent) << "doc = " << to_string(meta.doc.value())
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
if (meta.comment) {
|
||||
ss << pprint::Indent(indent)
|
||||
<< "comment = " << quote(to_string(meta.comment.value())) << "\n";
|
||||
<< "comment = " << to_string(meta.comment.value()) << "\n";
|
||||
}
|
||||
|
||||
if (meta.customData) {
|
||||
@@ -4682,7 +4682,7 @@ std::string print_layer_metas(const LayerMetas &metas, const uint32_t indent) {
|
||||
// << "." << tinyusdz::version_minor << "." << tinyusdz::version_micro
|
||||
// << tinyusdz::version_rev << "\"\n";
|
||||
} else {
|
||||
meta_ss << pprint::Indent(indent) << "doc = " << quote(to_string(metas.doc))
|
||||
meta_ss << pprint::Indent(indent) << "doc = " << to_string(metas.doc)
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user