donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.3k stars 145 forks source link

feat(functions): Provide option to skip cleanup in transforms #1300

Closed donmccurdy closed 3 months ago

donmccurdy commented 3 months ago

Some workflows require preserving seemingly unused or duplicate resources. Many transforms currently remove those resources as a side effect of cleaning up temporary resources created during normal operations. This PR provides an opt-out, cleanup: false, for these functions. Users opting out of cleanup will likely want to run prune() and dedup() manually, with options set for their needs, later in their pipelines.

Eventually I'd like to change the implementations of these functions so that they can clean up temporary resources without these side effects, but that will be a larger task for a future PR.

Related:

Remaining:

donmccurdy commented 3 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @donmccurdy and the rest of your teammates on Graphite Graphite