Extension for Script Editor

The following extensions are available for the Script Editor:

Format of Script Description

# --Description: Sample

Write the Script as above will be regarded as the Script description.
The character string used here(Sample in the above example) will be shown in the Description column and the Menu of the Script list.

By adding the localized code after --Description: , you can also display the localized description in accordance to the set language in the tool.
The following localization codes are supported.

Language Localized code
Japanese [ja]
English [en]
Chinese [zh]

Write the script as follows:

# --Description:[ja]日本語の説明
# --Description:[en]English explanation
# --Description:[zh]中文说明

Format of User Variables

User variable is a function that allows you to change the specification of object/string/value in the GUI instead of writing scripts directly on the Script Editor.
The variables defined within the range of # --BeginUserVariable and # --EndUserVariable are "User variables".
Note that you need to import " cri.atomcraft.project " to define a user variable to handle the objects.

import cri.atomcraft.project
# --BeginUserVariable
"""
VARIABLE_STRING:
type: string
comment: Cue name to search
VARIABLE_NUMBER:
type: number
comment: Volume
VARIABLE_OBJECT:
type: object
comment: Cue Sheet to manipulate
"""
VARIABLE_STRING = "test"
VARIABLE_NUMBER = 1.0
VARIABLE_OBJECT = None
# --EndUserVariable

In order to display the defined user variable on the user variable screen, please describe the variable name, type, and description in the "docstring" by using three double quotation marks " """ ", and then set the initial value for the variable.

There are 3 types of user variables. Change the specified type depending on the variable contents.

Types Description
object Specifies when the variable is an object
string Specifies when the variable is a string
number Specifies when the variable is a value

After saving and updating the variables, these user variables are displayed in the GUI area at the right side of the Script Editor.
Scripts with the defined user variables are displayed with icons in the Script list.

criatom_tools_atomcraft_api_uservariable.png

Change user variables

If you change the value in the GUI on the right side of the editor and click the "Apply" button, the changed content will be shown in the script.
To specify an object type variable, drag and drop the target object from CRI Atom Craft tree.
To unspecify the object type variable, select "Clear" from the right-click menu.