threerings/flump — pull request #124 by roguenet (2014-09-04 01:26:38+00:00)
Title: Combined export

This is a feature created for Tim's game Antihero. For source art simplicity, a game may have many assets broken up into multiple FLAs, but for runtime performance you want all those assets in a single texture. In order to match the current format and usage of Flump as much as possible, the ids and refs in the generated library JSON or XML are namespaced with the source FLAs name and a forward slash. So, if a project previously had three FLAs "foo", "bar" and "baz" that were generating foo.zip, bar.zip and baz.zip, you could now have a single library with movies and textures that have had their names prefixed with "foo/", "bar/" and "baz/".

Almost all of the changes are in the editor. When a project has a format with the combined flag set to true, the "export all" button changes to "export combined", and "export modified" is disabled, as is exporting individual libraries. In the unusual case where there are other formats that are not combined in the same .flump, hitting "export combined" will export them every time as if the "export all" button had been pressed in a project with no combined formats.

The only runtime change is the exposing of a new top level library flag: "isNamespaced". As such, the format version has not changed. This flag was exposed to make it easy for runtime usage of the new combined flump libraries to integrate asset instantiation seamlessly with non-combined libraries.

This has been tested for a short period in the Antihero client. I'm popping up this PR now to give people some time to comment before we merge it into Flump main.