UNPKG

touchdesigner-mcp-server

Version:
127 lines (124 loc) 4.29 kB
/** * Generated by orval v7.9.0 🍺 * Do not edit manually. * TouchDesigner API * OpenAPI schema for generating TouchDesigner API client code * OpenAPI spec version: 0.2.13 */ import { customInstance } from '../../api/customInstance.js'; // eslint-disable-next-line @typescript-eslint/no-redeclare export const TdNodeFamilyType = { COMP: 'COMP', CHOP: 'CHOP', TOP: 'TOP', SOP: 'SOP', DAT: 'DAT', MAT: 'MAT', CUSTOM: 'CUSTOM', }; // eslint-disable-next-line @typescript-eslint/no-redeclare export const TdPythonClassInfoType = { class: 'class', module: 'module', function: 'function', object: 'object', }; // eslint-disable-next-line @typescript-eslint/no-redeclare export const TdPythonClassDetailsType = { class: 'class', module: 'module', function: 'function', object: 'object', }; /** * @summary Delete an existing node */ export const deleteNode = (params, options) => { return customInstance({ url: `http://localhost:9981/api/nodes`, method: 'DELETE', params }, options); }; /** * @summary Get nodes in the path */ export const getNodes = (params, options) => { return customInstance({ url: `http://localhost:9981/api/nodes`, method: 'GET', params }, options); }; /** * @summary Create a new node */ export const createNode = (createNodeRequest, options) => { return customInstance({ url: `http://localhost:9981/api/nodes`, method: 'POST', headers: { 'Content-Type': 'application/json', }, data: createNodeRequest }, options); }; /** * Retrieves detailed information about a specific node including its properties, parameters and connections * @summary Get node detail */ export const getNodeDetail = (params, options) => { return customInstance({ url: `http://localhost:9981/api/nodes/detail`, method: 'GET', params }, options); }; /** * @summary Update node properties */ export const updateNode = (updateNodeRequest, options) => { return customInstance({ url: `http://localhost:9981/api/nodes/detail`, method: 'PATCH', headers: { 'Content-Type': 'application/json', }, data: updateNodeRequest }, options); }; /** * Returns a list of Python classes, modules, and functions available in TouchDesigner * @summary Get a list of Python classes and modules */ export const getTdPythonClasses = (options) => { return customInstance({ url: `http://localhost:9981/api/td/classes`, method: 'GET' }, options); }; /** * Returns detailed information about a specific Python class, module, or function including methods, properties, and documentation * @summary Get details of a specific Python class or module */ export const getTdPythonClassDetails = (className, options) => { return customInstance({ url: `http://localhost:9981/api/td/classes/${className}`, method: 'GET' }, options); }; /** * Call a method on the node at the specified path (e.g., /project1). This allows operations equivalent to TouchDesigner's Python API such as `parent_comp = op('/project1')` and `parent_comp.create('textTOP', 'myText')`. * @summary Call a method of the specified node */ export const execNodeMethod = (execNodeMethodRequest, options) => { return customInstance({ url: `http://localhost:9981/api/td/nodes/exec`, method: 'POST', headers: { 'Content-Type': 'application/json', }, data: execNodeMethodRequest }, options); }; /** * Execute a Python script directly in TouchDesigner. Multiline scripts and scripts containing comments are supported. The script can optionally set a `result` variable to explicitly return a value. This endpoint allows you to interact with TouchDesigner nodes programmatically. * @summary Execute python code on the server */ export const execPythonScript = (execPythonScriptRequest, options) => { return customInstance({ url: `http://localhost:9981/api/td/server/exec`, method: 'POST', headers: { 'Content-Type': 'application/json', }, data: execPythonScriptRequest }, options); }; /** * Returns information about the TouchDesigner * @summary Get TouchDesigner information */ export const getTdInfo = (options) => { return customInstance({ url: `http://localhost:9981/api/td/server/td`, method: 'GET' }, options); };