Component Editor Dialog
The Component Editor is a tool that assists with many aspects of creating custom components, especially the management of Custom Parameters. To open the Component Editor, right-click on the COMP you want to edit and select Customize Component...
Each major section of the Component Editor can be collapsed for convenience, and the parameter/page list area can be sized using the handle below it.
For more information about custom parameters, see: Custom Parameters
The header displays and controls which component you are editing. The name can be changed in the Component area. The currently selected component can be changed in the Path area. The three buttons in the top-right corner will open a floating viewer, parameter dialog, or network editor.
Creating Pages and Parameters
The top two lines of this section are used to create new custom pages and parameters. A custom page must be created before a custom parameter can be added. To create a page, enter the new page name into the text field and press Add Page. To create a parameter, enter the new parameter's label into the text field, select the parameter style, select the number of values (if necessary), and press Add Par. The label will automatically be converted into a valid parameter name (first letter capital, no special characters) when the parameter is created.
Working with the Page and Parameter Lists
The middle area of this section contains lists of the Component's custom pages and parameters. The parameter list shows the custom parameters in the currently selected page. Parameters and pages can be dragged to rearrange order. Parameters can also be dragged into different pages. Use right-click menus for cutting and pasting, including across different Components. Double-click to edit names, and press the 'x' to delete. Drag and drop in the list to reorder them.
Dragging a parameter onto the Parameter header duplicates the parameter in your component. If the duplicated parameter is a child of the edited component, an option will appear to create a reference to the top-level parameter on the child.
Editing Custom Parameters
When a custom parameter is selected in the list, an editing area is visible below the two lists. From top to bottom, this allows changing the custom parameter's name, label, enable state, section start (creates a divider above parameter), style, and style-specific values. To copy the current parameter value into the default, click the arrow next to the default section. For information about styles and style-specific values, see Custom Parameters.
Range min and max define the range for parameter sliders. Other values are still allowed in the text entry area. Clamp min and max define absolute minimums and maximums that cannot be passed even in the text area.
Cutting/Pasting Parameters and page
You can cut and paste parameters and pages by right-clicking or using ctrl-c and ctrl-v. You can select a different component and paste to copy from one component to another. TIP: copying parameters puts them on the clipboard in a human readable JSON format. You can edit these in any text editor, then re-copy them and paste the edited version.
The Extension Code section assists in creating python Extensions for your custom Component. To create a new extension, simply enter the name in the textbox and click Add. Once created, you can edit, reinitialize, or delete the extension using the buttons on the right. The + expands advanced features that let you create a custom definition and/or name for your extension, or turn Promotion on or off.
TIP: It is standard in TouchDesigner to capitalize your extension name and add the suffix
The Storage section gives you direct access to your Component's Storage dictionary. You can see all keys and data. Pressing x deletes the stored key and data. To change data or keys, double-click on text. To add a new key or refresh the list, use the buttons at bottom.
TIP: any data you enter will be evaluated by python so if you want to force string type data, enclose it in quotes.
Shortcuts and Tags
Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a Network Editor by pressing the keyboard shortcut 'p'.
Storage is a python dictionary associated with any operator, used to keep user-specified data within the operator.