Prior to installing the plugin into Cerebro, you should set up the configuration file path_config.json included in the plugin. It is necessary for correct file loading with all dependencies in graphics software you use. It will also establish a correspondence between the task structure in Cerebro projects and the directory structure on the file server.

The configuration file in the JSON format is located in the root folder of the plugin and consists of the following sections:

  • the project_path list is the list of the projects paths;
  • the file_path list describes the directory structure inside projects.
  • the soft_folder variable is the directory used to store file versions; its value is to be changed depending on the graphics software which starts the plugin.
  • the processors list describes a set of additional Python scripts executed by the plugin at specified events.
  • the net_mode variable defines the mode of file operation for each application.
  • the trans_mode variable switches on the file path transliteration mode.
  • переменная mirada_path – содержит путь до приложения Mirada, которое может быть использовано для генерации эскизов медиафайлов.
  • переменная status_filter – содержит перечень статусов для фильтрации списка задач.

The configuration file must include project_path and file_path sections; other sections are added as may be necessary. The absence of a field in a section means that the corresponding key is set to the default value (empty string for the string fields).

The project_path section

The project_path must contain at least one item (by default) and consists of structures of the following type:

{
  "project_name": "",
  "task_activity": "",
  "paths": [
      "/your_server_name/front/connector.files",
      "/Volumes/front/connector.files",
      "//your_server_name/front/connector.files"
  ]
}

Note

Здесь и далее вместо «your_server_name» нужно подставлять сетевое имя вашего файлового сервера.

Each structure describes possible file paths to the project root directory and contains the following fields:

  • project_name is the project name in Cerebro; if the value is set to an empty string then the structure contains default values for the projects which are not described in other list structures;
  • task_activity is the name of the activity type provided that the file path to the root directory depends on this name; the empty value also means that the described file paths are applicable by default to tasks with any activity type.
  • paths (obligatory field) is a set of possible paths to the root directory, for example, for various operating systems.

The file_path section

The second section file_path of the configuration file must contain at least one item (by default) and consists of structures of the following type:

{
  "folder_path": "",
  "task_activity": "",
  "name": "$(task_name)",
  "name_editable": "False",
  "publish": "$(task_parent_path)",
  "version": "$(task_parent_path)/versions",
  "ver_prefix": "_v",
  "ver_padding": "3",
  "local": "$(task_parent_path)",
  "publish_status": ""
}

Each structure describes a set of subfolders and a filename pattern used for storing file versions and contains the following fields:

  • folder_path is the path in Cerebro until the beginning of the project fork (usually the project name or the project section name) or an empty string which means the structure with default values for any task/file;
  • task_activity is the name of the activity type provided that file names depend on it; the empty value also means that the described parameters can be applied by default to tasks with any activity type.
  • name (obligatory field) is the formatted file name;
  • name_editable (“False” by default) is a flag of the possibility to set a file name manually upon adding the file to a task.
  • publish (obligatory field) is the formatted path to the directory containing the main published version of a media file;
  • version (obligatory field) is the formatted path to the directory with file versions;
  • ver_prefix is the additional element in the name of a numbered version file;
  • ver_padding (“3” by default) is the number of digits in the version number;
  • local (по умолчанию совпадает с publish) – форматированный путь до директории, содержащей рабочую версию (local version) медиафайла;
  • publish_status – имя статуса задачи, который будет предлагаться по умолчанию в окне публикации отчета.

If the values of the publish or version fields are not set then the plugin will not create the main or numbered version of the file correspondingly.

Note

The name field in the file_path section may contain an array of several values (for example, “name”: [“$(url[2])”, $(url[3]), $(task_name)”]). In this case a user can select a file name from several options in the dropdown menu when publishing the file.

Formatted paths and names can include the following variables:

  • $(url[0]), $(url[1]) … $(url[i]) is the name of a single item from the path to the selected task in Cerebro where i is the item’s nesting level starting from the project root. For example, $(url[0]) is the project name, $(url[1]) is the name of the first level subtask, etc.
  • $(soft_folder) is the directory for storing files. It is set in the variable of the soft_folder section (see below) and depends on the graphical host application;
  • $(task_name) is the name of the selected task in Cerebro, i.e. the last item of the $(url[i]) list;
  • $(task_path) is the path to the selected task in Cerebro. It consists of all $(url[i]) items including the last one;
  • $(task_parent_name) is the name of the parent task;
  • $(task_parent_path) is the path to the parent task in Cerebro.

You can use environment variables of the operating system provided that their names do not coincide with the variables listed above. They can be used in the same way: $(VARIABLE_NAME).

The soft_folder section

You can use the soft_folder variable to set the directory for storing versions, and the value may differ depending on the graphical application which started the plugin. The variable may be used in the formatted paths in other sections of the configuration file.

The soft_folder item structure:

{
  "maya": "",
  "nuke": "",
  "houdini": "",
  "blender": "",
  "cinema4d": "",
  "3dsmax": "",
  "katana": "",
  "revit": "",
  "autocad": "",
  "tbharmony": "",
  "photoshop": "",
  "aftereffects": "",
  "indesign": "",
  "illustrator": "",
  "animate": "",
  "premiere": ""
}

The internal name of a supported graphical application (“maya”, “nuke”, “houdini”, “blender”, “cinema4d”, “3dsmax”) is a key in the set of paths, and the string with the directory name is the value.

The processors section

In the processors section, you can specify a set of additional Python scripts which will be executed by the plugin at specified events emerging during the work of the plugin.

The list of processed events:

  • opening a file – the name starts with “open”;
  • creating a new file in the task – the name starts with “new”;
  • saving a version – the name starts with “version”;
  • publishing a report – the name starts with “publish”;
  • вставка объектов по ссылке – имя начинается с “link”;
  • встраивание объектов – имя начинается с “embed”.

There are 3 call points of the function handler relative to the main function for each operation type:

  • before executing the main function – the name ends with “_pre”;
  • to replace the main function – the name ends with “_replace”;
  • after executing the main function – the name ends with “_post”.

The structure of the processors item (only file opening handlers are shown):

{
  "maya": "",
  "nuke": "",
  "houdini": "",
  "blender": "",
  "cinema4d": "",
  "3dsmax": "",
  "katana": "",
  "revit": "",
  "autocad": "",
  "tbharmony": "",
  "photoshop": "",
  "aftereffects": "",
  "indesign": "",
  "illustrator": "",
  "animate": "",
  "premiere": ""
}

The structure describes a set of additional scripts for one of supported graphical application and contains the following fields:

  • the soft_name variable is the internal name of a supported graphical application provided that a set of additional scripts is defined for this application.
  • an array of elements describing handlers where each element contains two fields:
     - script_path – the full path to a Python script (handler);
     - function – the function name inside the script.

Handler parameters

Handler functions from additional scripts must correspond with certain call agreements namely:

  • accept two parameters, Python dictionaries (see the details below), as arguments;
  • return the second dictionary, probably the modified one.

The first argument is the same for all handlers and contains the following elements:

  • task_id – the ID of a task in Cerebro;
  • task_name – the name of the task;
  • task_parent_id – the ID of a parent task;
  • task_parent_path – the parent task path in Cerebro;
  • task_status_id – the ID of the current status of the task;
  • task_status_name – the name of the current status of the task;
  • task_activity_id – the ID of the activity type of the task;
  • task_activity_name – the name of the activity type of the task;
  • current_user_id – the current user ID;
  • current_user_name – the current user displayed name.

The second argument of the function may differ depending on the type of the processed event:

  • for all create and open a file events – a dictionary with the following elements:
     - original_file_path – the full path to the source file;
     - local_file_path – the full path to the working file.
  • for all save the version and publish the report events – a dictionary with the following structure:
{
  "local_file_path": "",
  "version_file_path": "",
  "publish_file_path": "",
  "report":
  {
    "plain_text": "",
    "work_time": ""
  },
  "attachments":
  {
    "file_path": [ paths to file thumbnails ],
    ...
  },
  "links":
  {
    "file_path": [ paths to file thumbnails ],
    ...
  }
}

, where
 - local_file_path – the full path to the working file;
 - version_file_path – the full path to the version file to be published;
 - publish_file_path – the full path to the main file to be published (used only for report publishing events);
 - report – the data for a Cerebro report, it is comprised of two fields: the report text and the work time in minutes;
 - attachments – a set of files attached to the report, it contains the list of the file paths;
 - links – a set of files attached to the report with a link, it contains the list of the file paths.

  • for all create and open a file events – a dictionary with the following elements:
     - file_path – полный путь до импортируемого файла.

The net_mode section

You can use the net_mode variable to set the mode of file operations. It can accept various values depending on the graphics software starting the plugin.

The net_mode item structure:

{
  "maya": "",
  "nuke": "",
  "houdini": "",
  "blender": "",
  "cinema4d": "",
  "3dsmax": "",
  ...
}

Possible values of the variable for an application:

  • local is used for work in the internal network of a company; prior to accessing files they are copied to the local directory on the workstation;
  • network (the default value) is used for work in the internal network of a company; files are accessed directly in the network catalogue without copying to a local directory;
  • remote is used for remote work; files are accessed using HTTP and sent to the storage using the Cargador.

The trans_mode section

You can use the trans_mode variable to switch on the transliteration of file paths corresponding to the Cerebro tasks. It can accept various values depending on the graphical application starting the plugin.

The trans_mode item structure:

{
  "maya": "",
  "nuke": "",
  "houdini": "",
  "blender": "",
  "cinema4d": "",
  "3dsmax": "",
  ...
}

Possible values: False (by default), True.

If the transliteration mode is switched on, all Cyrillic letters in the file paths will be converted automatically into Latin letters and white spaces will be converted into underscore symbols (“_”). For example, the file path /Project 01/Моделирование will be converted into /Project_01/Modelirovanie.

The mirada_path section

Переменная mirada_path позволяет задать полный путь до приложения Mirada (см. раздел “Mirada Utility”), после чего данная утилита будет использована при генерации эскизов для публикуемых медиафайлов.

Тип переменной – строка. Пример:

"mirada_path": "C:/Program Files/Cerebro/mirada.exe"

The status_filter section

Переменная status_filter позволяет задать список статусов для фильтрации списка задач (см. раздел “Working with a list of tasks”). По умолчанию фильтрация предполагает отображение задач во всех статусах, кроме остановленных (“task stopped”, подробнее см. раздел “Task statuses”).

Тип переменной – массив строк. Пример:

"status_filter": ["in progress", "pending review"]

<< Previous     Next >>

Did this answer your question?