The design and implementation of an Open Source animation tool.

July 14, 2007

Splitting Structured Assets

Some assets are structured; that is, they are a collection of sub-assets. Examples of sub-assets include individual objects in an SVG file (referenced by XML ID), layers in a photoshop file (referenced by name), audio and video tracks in an MPEG file, and perhaps even placed assets and "groups" (embedded sub-scenes) in a scene. It should be possible to work with them individually.

To this end, a structured asset can be split, revealing its constituent parts. Some structured assets are hierarchical, meaning that they can be further split. For instance, splitting an SVG file from Inkscape might reveal the top-level groups which act as layers, each of which could be further split to reveal the individual objects on that layer, and so on down.

There are two places an asset can be split:
  • In the asset pane, where the enclosing asset will be hidden and its sub-assets shown (the enclosing asset will be marked as "split" in its metadata)
  • In the editor pane, when editing a scene, the asset will be replaced in the scene by its sub-assets (with no effect on the enclosing asset's metadata)
An asset will always be shown in the asset pane while it is in direct use somewhere in the project (reachable from the top level of the project). Otherwise, provided it is in an asset directory and not marked as "split" itself, it will be shown if it is a top-level asset or its enclosing asset is marked as "split".

One implication of this is that we will need to be able store distinct metadata for sub-assets. Their initial tags are derived from their enclosing assets, plus their own name (in the case of SVG objects, its inkscape:label if there is one, and its XML ID otherwise).

No comments: