enve

Open-source 2D animation software

Home Documentation Download

Xev File Format Specification

Xev is a XML-based format similar to ora and kra.
It is meant to be a more open replacement for enve binary ev format.

File Layout Specification

Storage

Xev files have the file name extension .xev. The data is stored within a Zip file wrapper.

Files

example.xev
├ mimetype
├ document.xml
├ UI/
│  └ layouts.xml
├ Thumbnails/
│  └ thumbnail.png
└ scenes/
   ├ 0/
   │  ├ stack.xml
   │  ├ properties.xml
   │  ├ gradients.xml
   │  └ objects/
   │    ├ 0/
   │    │  ├ stack.xml
   │    │  ├ properties.xml
   │    │  ├ assets/
   │    │    └ [PNG images (if any) referenced by properties.xml]
   │    │  └ objects/
   │    │    └ [child objects (if any)]
   │    ├ 1/
   │    │  └ (...)
   │    └ (...)
   ├ 1/
   │  └ (...)
   └ (...)

mimetype

The first file in the archive must be called “mimetype”, without a file name extension. It must be STORED without compression. This file must contain the string “application/enve”, with no whitespace or trailing newline.

Thumbnails/thumbnail.png

A xev file must have a thumbnail.png in order to allow file browser software to render the thumbnail efficiently. It must be a non-interlaced PNG with 8 bits per channel of at most 256x256 pixels. It should be as big as possible without upscaling or changing the aspect ratio. Any aspect ratio is permitted. It should not contain any frame or decoration.

document.xml

<Document format-version="0">
    
    <!-- bookmarked colors -->
    <ColorBookmarks>
        <Color name="#000000"/>
        <!-- more colors -->
    </ColorBookmarks>
    
    <!-- bookmarked libmypaint brushes -->
    <BrushBookmarks>
        <Brush collection="Classic" name="blending_knife"/>
        <!-- more brushes -->
    </BrushBookmarks>
    
    <!-- scenes declaration -->
    <Scenes>
        <!-- scene with stack index 0 -->
        <Scene name="Example" width="1920" height="1080" fps="24"
               frame="101" clip="true" resolution="1"/>
        <!-- more scenes, with consecutive stack indexes -->
    </Scenes>
</Document>

scenes/X/

X - stack index, based on the order of appearence in document.xml.
All properties and objects contained in the scene are specified in this folder.
The content of this folder is similar to a Group Object’s scenes/X/objects/Y/ folder. The only difference is that a scene folder contains gradients.xml.

scenes/X/gradients.xml

This file declares all gradients used by scene’s child objects.

<Gradients>
    <Gradient id="0">
        <Color mode="0">
            <V1 value="1"/>
            <V2 value="0"/>
            <V3 value="0"/>
            <A value="1"/>
        </Color>
        <Color mode="0">
            <V1 value="1"/>
            <V2 value="1"/>
            <V3 value="1"/>
            <A value="1"/>
        </Color>
        <!-- more colors -->
    </Gradient>
    <!-- more gradients -->
</Gradients>

scenes/X/objects/Y/

Y - object stack index, based on the order of appearence in stack.xml.

scenes/X/objects/Y/properties.xml

Defines object’s properties.

stack.xml

Declares children order, names and types.

<Stack>
    <Object name="Object 1" type="5"/>  <!-- stack index: 0 -->
    <Object name="Path 3" type="0"/>  <!-- stack index: 1 -->
    <!-- more objects -->
</Stack>
objects/

Contains child object folders, named according to object stack indexes, which correspond to their order in stack.xml.

Syntax

Object

properties.xml

<Object id="1" open="0 1">
    <CustomProperties/>
    <BlendEffects/>
    <Transform open="0">
        <Translation>
            <X value="711.5446680890581"/>
            <Y value="375.5977814084237"/>
        </Translation>
        <Scale>
            <X value="3.680336265192215"/>
            <Y value="3.680336265192215"/>
        </Scale>
        <Rotation value="0"/>
        <Pivot>
            <X value="253.9383754730225"/>
            <Y value="156.3928337097168"/>
        </Pivot>
        <Shear>
            <X value="0"/>
            <Y value="0"/>
        </Shear>
        <Opacity value="100"/>
    </Transform>
    <RasterEffects/>
    <PathEffects/> <!-- base path effects -->
    <PathEffects/> <!-- fill path effects -->
    <PathEffects/> <!-- outline base path effects -->
    <PathEffects/> <!-- outline path effects -->
</Object>

Each object has its own xev-file-wide unique id.
Ids of the timeline widgets in which property content is shown is saved in open attribute.

There are many types of objects. The type is defined in parent’s stack.xml

type

Path Object

Ellipse Object

Rectangle Object

Text Object

Group/Layer Object

Video/Image Sequence/SVG Link/Image Object

Object/Group/Scene Link Object

Paint Object

Sculpt Path Object

Properties

Transform

Color

Gradient

Path

Sculpt Path

Static Group Property

Dynamic Group Property

Paint Canvas

Text