The following extensions are available for the Script Editor:
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:
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.
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.
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.