-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected handling of generator
during merge
#1363
Comments
I'm not aware of any precedent for comma-separated generator strings, and I'm hesitant to invent one... I think this is kind of what XMP's 'ingredient' concept was made for, but it's complicated and subjective enough (discussed in #1367) that I don't think glTF Transform should try to do that in merge() automatically. Is this a problem for your use case? My hunch is that your application knows better than glTF Transform can know, whether one generator string should win, or whether concatenating them is meaningful... It might be best to assign the generator string directly in the script above. In terms of the default behavior — I'm tempted to say that the original generator string on the document should be kept, and not modified in a merge, which feels more semantically defensible than last-document-in-wins. One could also argue that the generator should be "glTF Transform". ;) |
The comma-separated list was just an overly suggestive attempt to "retain all information" (with the obvious caveats). I'd also agree that keeping the generator of the target document when merging in others could make more sense. (And that's what I assumed to happen ... but... fixed it...). Justifications for that could be...
But I don't have a strong opinion about the solution. Knowing what the behavior is allows users to set the generator as they see fit, and I just wanted to bring it up. (So the issue could be closed if there's no strong reason to change anything). |
Proposed solution: tl;dr - |
This might not be considered to be an "issue", but ... I stumbled over this, and find it at least unexpected: When calling
merge
, then theasset.generator
of the target document is apparently just overwritten with the one from the merged-in document.To Reproduce
Run this:
The output will be
Expected behavior
That's the tough one 🙂 The
generator
is basically a "free-text" field without any specified meaning. But roughly speaking, I'd expect that ~"no information is lost". A simple and straightforward solution could be just just append the merged-in generator to the one that is already present, yieldingin the above example. But... with the obvious caveat that the output should't be
when merge-assembling one target document from 8 partial input documents.
Regardless of what the solution could or will be, I thought it might be worth bringing this up...
Versions:
The text was updated successfully, but these errors were encountered: