All actions are created through a pair of JSON and python source file.
{
"label": "Example Action",
"inputs": [
{
"label": "Dummy Boolean Input",
"type": "Boolean",
"value": true
},
{
"label": "Dummy Path Input",
"type": "Path",
"value": "D:/Personal_Work/Pipeline"
}
],
"outputs": [
{
"label": "Dummy Output",
"type": "Path",
"value": "D:/Personal_Work/Pipeline/test.abc"
}
],
"supported_engines": [
"maya"
],
"exec_path": "my_example_action.py"
}
my_example_action.json
import pymel.core as pm
pm.sphere(r=10)
my_example.py
- Each action should have two files:
- A JSON file describing the action and its input.
- A python file containing the code for the action.
- The action python file should have the same name as its corresponding JSON file.
- Each action should have a
label
field with a readable name. - If a action needs any inputs, these are mentioned inside the
inputs
list. - Each input should have a
label
. - An input and output
type
can be any one of:Empty
Boolean
String
Float
Integer
Path
- Supported engines is optional. If left empty, the action will be valid for all engines. Othewise it can be one of:
maya
houdini
nuke
- The relative path of the python file is written in
exec_path
field.