AnalyticalGraphicsInc / gltf-vscode

This is an extension for Visual Studio Code to add support for editing glTF files.
Apache License 2.0
460 stars 63 forks source link

Smart property deletion? #96

Open zellski opened 6 years ago

zellski commented 6 years ago

I've come to use this plugin more than nearly any other tool in my daily work. Quite often I use it to experimentally strip out some aspect of a .glb. This plugin makes making small edits to the JSON a breeze. Thank you for that.

If there's one feature request I have above others, though, I'd love to be able to delete a buffer/bufferView/accessor, or in fact any glTF property at all, and have all other references in the model automatically update. If I delete accessor 6, all remaining accessor references > 6 all need to decrease by one. Doing this by hand is a chore, and very error prone.

In an ideal world, deleting an accessor that was the only reference to a bufferView could pop up a dialog asking if I additionally want to delete the bufferView that just became an orphan...

emackey commented 6 years ago

Along the theme of renumbering references, I've also heard feature requests for merging glTF models of parts into a single final object. After some experimentation, I found that two separate glTFs with two separate bin files can easily be merged, and renumbering of references is 99% of the work after concatenating the arrays manually with copy-and-paste. Seems like the ability to edit array members and keep the numbering scheme up-to-date is a great idea. Not sure if/when I'll have enough time to implement such a thing though. Contributions welcome, if you're allowed to sign the CLA.

zellski commented 6 years ago

Merging two glTF models like that never even crossed my mind, but -- yes, why not? Fascinating.

I will see if I can find someone to rope in for a contribution. I'm neglecting my own open-source commitments already. :)