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">
            <Red value="1"/>
            <Green value="0"/>
            <Blue value="0"/>
            <Alpha value="1"/>
        </Color>
        <Color mode="0">
            <Red value="1"/>
            <Green value="1"/>
            <Blue value="1"/>
            <Alpha value="1"/>
        </Color>
        <!-- more colors -->
    </Gradient>
    <!-- more gradients -->
</Gradients>
scenes/X/properties.xml

See properties.xml. Defines scene background color.

<Object id="0">
   <!-- background color -->
   <Color mode="0">
      <Red value="1"/>
      <Green value="1"/>
      <Blue value="1"/>
      <Alpha value="1"/>
   </Color>
</Object>

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="0">
   <Transform>
      <Translation>
         <X value="0"/>
         <Y value="0"/>
      </Translation>
      <Rotation value="0"/>
      <Scale>
         <X value="1"/>
         <Y value="1"/>
      </Scale>
      <Shear>
         <X value="0"/>
         <Y value="0"/>
      </Shear>
      <Pivot>
         <X value="0"/>
         <Y value="0"/>
      </Pivot>
      <Opacity value="100"/>
   </Transform>
   
   <Properties>
      <!-- properties -->
   </Properties>
   
   <BlendEffects>
      <!-- blend effects -->
   </BlendEffects>
   
   <RasterEffects>
      <!-- raster effects -->
   </RasterEffects>
   
   <!-- path effects are supported only by: -->
   <!-- groups, layers, paths, ellipses, rectangles, text -->
   <PathBaseEffects>
      <!-- path effects -->
   </PathBaseEffects>
   <FillEffects>
      <!-- path effects -->
   </FillEffects>
   <OutlineBaseEffects>
      <!-- path effects -->
   </OutlineBaseEffects>
   <OutlineEffects>
      <!-- path effects -->
   </OutlineEffects>
   
   <!-- object type specific properties -->
</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

properties.xml

<Object id="2">
   <!-- object properties -->
   <!-- Fill / Outline settings -->
   <Paths>
      <Path closed="true" name="path" ctrlValues="* *;* *" mode="0" frames="* 0 *;* 5 *" ctrlModes="1;1"
            values="* * 0 0 * * 2,* * -3.08571 162 * * 2,* * 172.8 157.371 * * 2,* * 169.714 0 * * 2;* * 0 0 * * 2,* * -3.08571 162 * * 2,* * 205.2 157.371 * * 2,* * 202.114 0 * * 2"/>
   </Paths>
</Object>

You can read more about Fill and Outline settings.

A signle Path values node has a format c0x c0y p1x p1y c2x c2y m, where c0x and c0y are coordinates of the first control point, p1x and p1y are coordinates of the node, c1x and c1y are coordinates of the second control point, and m is a control points mode (smooth (0), symmetric (1), or corner (2)).

c0x, c0y, c1x, and c1y can have a value of * which means they are not enbled (have the same value as p1x /p1y node corrdinates).

Ellipse Object

properties.xml

<Object id="2">
   <!-- object properties -->
   <!-- Fill / Outline settings -->
   <TopLeft>
      <X value="0"/>
      <Y value="0"/>
   </TopLeft>
   <BottomRight>
      <X value="266.9142857142856"/>
      <Y value="180.5142857142857"/>
   </BottomRight>
   <RoundRadius>
      <X value="0"/>
      <Y value="0"/>
   </RoundRadius>
</Object>

Rectangle Object

properties.xml

<Object id="2">
   <!-- object properties -->
   <!-- Fill / Outline settings -->
   <TopLeft>
      <X value="0"/>
      <Y value="0"/>
   </TopLeft>
   <BottomRight>
      <X value="266.9142857142856"/>
      <Y value="180.5142857142857"/>
   </BottomRight>
   <RoundRadius>
      <X value="0"/>
      <Y value="0"/>
   </RoundRadius>
</Object>

Text Object

properties.xml

<Object fontSlant="0" fontWeight="400" hAlign="1" fontSize="72" fontWidth="5" fontFamily="Arial" id="1" vAlign="32">
   <!-- object properties -->
   <!-- Fill / Outline settings -->
   
   <Text value="example text"/>
   <Spacing>
      <Letters value="0"/>
      <Words value="1"/>
      <Lines value="1"/>
   </Spacing>
   <TextEffects/>
</Object>

Group/Layer Object

properties.xml

<Object id="1">
   <!-- object properties -->
   <FlipBook checked="false">
      <Index value="0"/>
   </FlipBook>
</Object>

SVG Link/Image Object

properties.xml

<Object id="1" srcAbs="/home/username/Documents/folder/(...)" srcRel="folder/(...)">
   <!-- object properties -->
</Object>

Image Sequence

properties.xml

<Object id="1" srcAbs="/home/username/Documents/folder/(...)" srcRel="folder/(...)">
   <!-- object properties -->
   <Frame enabled="false" value="0"/> <!-- frame remapping -->
</Object>

Video Object

properties.xml

<Object id="1" absSrc="/home/username/Documents/folder/(...)" relSrc="folder/(...)">
   <!-- object properties -->
   <Frame enabled="false" value="0"/> <!-- frame remapping -->
   <Sound>
      <Volume value="100"/>
   </Sound>
</Object>

Object/Group/Scene Link Object

properties.xml

<Object id="2">
   <!-- object properties -->
   <LinkTarget targetId="3"/>
</Object>

ObjectLink targetId corresponds to target Object’s id.

Paint Object

properties.xml

<Object id="1">
   <!-- object properties -->
   <Canvas pivot="64 64"/> <!-- assets/Canvas -->
</Object>

pivot - specifies position of (0, 0) pixel. If Canvas is animated there are multiple values seperated by comas, e.g., 64 64, 128 128

Image Assets

Paint Object images are saved in Canvas property assets folder (...)/assets/Canvas/, e.g., /scenes/0/objects/0/assets/Canvas/.

There is only a single image for not animated PaintSurface - value.png. For animated PaintSurface, image names correspond to the frames they are on, e.g., 0.png for a keyframe on frame 0.

Properties

Numeric Property

Color

Gradient

Fill

Outline

Path

Static Group Property

Dynamic Group Property

Paint Canvas

Text