Let us dwell on a configuration file example.

{
    "project_path": [
        {
            "project_name": "",
            "task_activity": "",
            "paths": [
                "/s2/front/connector.files",
                "/Volumes/front/connector.files",
                "//s2/front/connector.files"
            ]
        }
    ],
    "file_path": [
        {
            "folder_path": "",
            "task_activity": "",
            "name": "$(task_name)",
            "publish": "$(url[0])/$(url[1])/$(url[2])",
            "version": "$(url[0])/$(url[1])/$(url[2])/versions",
            "ver_prefix": "_v",
            "ver_padding": "3"
        },
        {
            "folder_path": "/$(url[0])/Environment",
            "task_activity": "texturing",
            "name": "$(task_name)",
            "publish": "$(url[0])/$(url[1])/$(url[2])/$(soft_folder)/",
            "version": "$(url[0])/$(url[1])/$(url[2])/$(soft_folder)/versions",
            "ver_prefix": "_v",
            "ver_padding": "2"
        }
    ],
    "soft_folder":
    {
        "maya": "3D",
        "nuke": "Compose",
        "houdini": "3D",
        "blender": "3D",
        "cinema4d": "3D",
        "3dsmax": "3D",
        "katana": "3D"
    },
    "processors":
    {
        "maya":
        {
            "new_pre":
            {
                "script_path": "//s2/front/testwnd.py",
                "function": "new_pre"
            },
            "new_post":
            {
                "script_path": "//s2/front/testwnd.py",
                "function": "new_post"
            }
        }
    }
}

In this example, the project_path section contains one structure with an empty project name and activity type, i.e. default values for all projects/tasks. Inside the structure, there are three possible paths to the root directory with the project files. It is the path to the public folder for Linux, Mac OS X and Windows operating systems correspondingly.

The file_path section contains two structures. The first one describes default paths and names for any projects and project sections. The second one is used only for texturing tasks in any project of the “Environment” subsection.

The second structure also enables the $(soft_folder) variable. Its values are described in the next section of the configuration file.

For example, according to the structure in the project_path and the first structure of the file_path section the Cerebro task with URL cerebro:/Cartoon_1/Ep_01/Sc_01/modeling will have the following location of Autodesk Maya files in the Windows operating system:

  • the main version of the file: //s2/front/connector.files/Cartoon_1/Ep_01/Sc_01/modeling.ma
  • numbered versions (number 1, 2, 3, …) as follows: //s2/front/connector.files/Cartoon_1/Ep_01/Sc_01/versions/modeling_v001.ma

And according to the structure in the project_path and the second structure in the file_path section the task with URL cerebro:/Cartoon_2/Environment/Johns House/texturing will be located as follows:

  • the main version of the file: //s2/front/connector.files/Cartoon_2/Environment/Johns House/3D/texturing.ma
  • numbered versions as follows: //s2/front/connector.files/Cartoon_2/Environment/Johns House/3D/versions/texturing_v01.ma

The second example of the task includes the 3D subdirectory which is added for the Autodesk Maya program in accordance with the soft_folder structure, and another digital capacity is used for the version number.

The processors section describes two event handlers for the Autodesk Maya host application:

  • “new_pre” means triggering before creating a new file, the new_pre function from the public script //s2/front/testwnd.py is called;
  • “new_post” means triggering after creating a new file, the new_post function from the public script //s2/front/testwnd.py is called.

<< Previous     Next >>

Did this answer your question?