directorystruct - eyeonSoftware/epp GitHub Wiki

Directory Structure

Overview

The directory structure is an xml format that is used by the project and shot templates.

Based on its definition a complete directory structure is created. It has several advanced features:

  • Create folder structure
  • Create, copy or append files
  • Replace custom variables
  • Replace environment variables
  • Replace time variables
  • Traverse to predefined ids

Tags

The format defines the following tags:

  • folder: creates a folder in the position. May be nested. * attributes

    • name: the folder name in the directory structure
      • NEW IN v0.3.3.2: Absolute paths can be used when you use a format like "!C:\temp\absoultepath;".
    • id: the unique id to be able to navigate to the folder regardless of name changes
  • file: creates a file in the position. has to be nested within a folder * attributes

    • name: the filename in filesystem
    • src: copies the file from the filename. Relative to the xml file or absolute paths are allowed.
  • create: create a file from scrath. Has to be child of file. * attributes

    • parse: bool if variables should be parsed
    • unescape: bool if html should be unescaped (&lt; becomes < &gt; becomes > etc.). Useful for xml files.
    • override: bool override existing files
  • append: like created but appends text to a file source. Has to be child of file. * attributes

    • parse: bool if variables should be parsed
    • unescape: bool if html should be unescaped (&lt; becomes < &gt; becomes > etc.). Useful for xml files.
    • override: bool override existing files

Variables

You can parse variables in name attributes, created files etc. You can define three types of variables:

  • Passed variables:
    • These are variables that are passed by the application, like the format, project or shot name.
    • Format: $variablename;
  • Environment variables:
    • These are your systems environment variables that are replaced within your template.
    • Format: %variablename%
  • Predefined variables:
    • These are variables which are predefined by the script.
    • Format: $__name__;
    • Variables:
      • $__TIMEFS__; Time in a filesystem safe format %H_%M_%S
      • $__TIME__; Time in a readable format %H:%M:%S
      • $__DATEFS__; Date in a filesystem safe format %y_%m_%d
      • $__DATE__; Date in a readable format %m/%d/%y
      • $__ROOT__; Root directory where the folder structure is created at

Project

The templates in the project_dirs folder define project directory structures. You can have as many xml files in this folder as you like. You will be asked in the add_project gui to choose one template for your project. Make sure the requirements below are met. Here an example template:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Required: Do not change the root directory -->
<folder name="$PROJECTNAME;">
    <!-- Required: Make sure your format is defined in the project_config.xml at the root -->
    <file name="project_config.xml">
        <append parse="true">
            &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
            &lt;project&gt;
                &lt;format&gt;
                    &lt;name&gt;$format_name;&lt;/name&gt;
                    &lt;width&gt;$format_width;&lt;/width&gt;
                    &lt;height&gt;$format_height;&lt;/height&gt;
                    &lt;framerate&gt;$format_framerate;&lt;/framerate&gt;
                    &lt;aspectx&gt;$format_aspectx;&lt;/aspectx&gt;
                    &lt;aspecty&gt;$format_aspecty;&lt;/aspecty&gt;
                &lt;/format&gt;
                &lt;creation&gt;
                    &lt;author&gt;%USERNAME%&lt;/author&gt;
                    &lt;timestamp&gt;$__DATE__; $__TIME__;&lt;/timestamp&gt;
                    &lt;system&gt;%COMPUTERNAME%&lt;/system&gt;
                &lt;/creation&gt;
            &lt;/project&gt;
        </append>
    </file>

    <!-- Required: This is where shots will be created in -->
    <folder name="Shots" id="shots">
    </folder>

    <!-- Required: This is where the generation project goes -->
    <folder name="_gen" id="generation">
    </folder>

    <!-- Create your individual directory structure. You can use ids to access them
         via API later on. -->
    <folder name="3D">
        <folder name="Models">
        </folder>
        <folder name="Textures">
        </folder>
    </folder>

    <folder name="References">
        <folder name="Images">
        </folder>
    </folder>

    <folder name="Client">
        <folder name="Input">
        </folder>
        <folder name="Output">
        </folder>
    </folder>
</folder>

Variables that epp forwards are:

  • PROJECTNAME
    • Has to be the root directory. Do not change or remove this folder entry.
  • Format - Project format for reference.
    • format_name
    • format_width
    • format_height
    • format_framerate
    • format_aspectx
    • format_aspecty

The following ids must be defined:

shot: points to the root folder where shots are created generation: points to the folder where the generation project is created.

Also in the projectname folder a project_config.xml should be created which holds the project format and optional creation tags. See the example above.

Shot

The templates in the shot_dirs folder define shot directory structures. You can have as many xml files in this folder as you like. You will be asked in the add_shot gui to choose one template for your shot. Make sure the requirements below are met. Here an example template:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Required: Do not change the root directory -->
<folder name="$SHOTNAME;">
    <file name="shot_config.xml">
        <append parse="true">
            &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
            &lt;shot&gt;
                &lt;creation&gt;
                    &lt;author&gt;%USERNAME%&lt;/author&gt;
                    &lt;timestamp&gt;$__DATE__; $__TIME__;&lt;/timestamp&gt;
                    &lt;system&gt;%COMPUTERNAME%&lt;/system&gt;
                &lt;/creation&gt;
            &lt;/shot&gt;
        </append>
    </file>

    <!-- Required: This is where your compositions are stored in -->
    <folder id="compositions" name="comp">
    </folder>

    <folder name="3D">
        <folder name="textures">
        </folder>
        <folder name="scenes">
        </folder>
        <folder name="data">
        </folder>
    </folder>

    <folder name="images">
        <folder name="Input">
        </folder>
        <folder name="Output">
        </folder>
    </folder>
</folder>

Variables that epp forwards are:

  • SHOTNAME
    • Has to be the root directory. Do not change or remove this folder entry.

The following ids must be defined:

compositions: points to the root folder where compositions are created

Also in the projectname folder a shot_config.xml should be created which holds shot specific and optional creation tags. See the example above.

⚠️ **GitHub.com Fallback** ⚠️