Skip to content

Latest commit

 

History

History
73 lines (67 loc) · 1.93 KB

action_creation_doc.md

File metadata and controls

73 lines (67 loc) · 1.93 KB

Action Creation

All actions are created through a pair of JSON and python source file.

Example

{
    "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

Guidelines:

  1. Each action should have two files:
    • A JSON file describing the action and its input.
    • A python file containing the code for the action.
  2. The action python file should have the same name as its corresponding JSON file.
  3. Each action should have a label field with a readable name.
  4. If a action needs any inputs, these are mentioned inside the inputs list.
  5. Each input should have a label.
  6. An input and output type can be any one of:
    • Empty
    • Boolean
    • String
    • Float
    • Integer
    • Path
  7. Supported engines is optional. If left empty, the action will be valid for all engines. Othewise it can be one of:
    • maya
    • houdini
    • nuke
  8. The relative path of the python file is written in exec_path field.