CHOP exporting sends the number values in a CHOP channel to a Parameter of any operator.
There are numerous ways to export CHOP channels in TouchDesigner.
TIP: it is better to export from a Null CHOP so you can add various CHOPs to the network without the need to re-export from another CHOP.
See also: DAT Export.
How to Export Channels from CHOPs
Exporting from a CHOP node viewer
- Make sure you have the parameter you want to export to visible somewhere on your interface. For example, select the OP and display its parameters by pressing 'p' hotkey, or open a floating parameter dialog for that OP.
- Turn on the Viewer Active Flag of the Node Viewer for the CHOP you wish to export from, if it is not already on.
- Drag a channel's name in the viewer to the parameter. When dropped, select Export CHOP from the pop-up menu.
Exporting from CHOP Viewer
- Select the CHOP you wish to export from.
- Turn on the Display flag for the selected CHOP.
- Open a CHOP Viewer pane by changing the current pane to a CHOP Viewer type (Alt+5) or by linking another Viewer pane to the current pane using the Link menu. See the figure below.
- Make sure you have the parameter you want to export to visible somewhere on your interface, in another pane or using a floating parameter dialog.
- Drag the channel from the CHOP viewer (grab the channel name) using the left mouse button to the parameter you want. When you are dragging the channel over a parameter that will accept it, a plus (+) sign will appear. Drop the channel on the parameter.
- When dropped, select Export CHOP from the pop-up menu.
Exporting Using the CHOP Exporter
- Select the CHOP you wish to export from.
- Right click on the CHOP and select CHOP Exporter ... from the pop-up menu. The CHOP Exporter dialog will open.
- You will see the available channels from this CHOP in the CHOP Exporter. Drag and drop the channel name (like "chan1") on the left to the parameter you want to export to. Make sure you have the parameter you want to export to visible somewhere on your interface. Drag the channel to the parameter to export to and drop it. In the pop-up menu select Export CHOP.
- Once the channel has made an export connection with a parameter, you can toggle the export on/off with the flags in the CHOP Exporter dialog. You can also remove an Export in the CHOP Exporter by clicking the "X" button beside the appropriate export.
- For more details on using this dialog, see CHOP Exporter.
Using Automatic Exporting by Channel Name
You can enable Automatic Exporting on the Common page of any CHOP by selecting Automatic by Name in the Export Method parameter menu. CHOP channels will automatically be exported if the channel name can resolve to the path/parameter in the file. ':' and/or '/' are used as separators for the paths and parameter. For example a channel named geo1:tx, will get exported to a node named geo1, parameter tx, if it exists. The node is searched for starting at the node that the Export Root parameter refers to. Usually the Export Root is left as default, which is '..'. This means "start searching at my parent". So for the above example, the CHOP will need to be in the same COMP as geo1 for the export to work. The channel names can contain paths, such as container1/geo1:tx. which will search for container1/geo1 (relative to the Export Root), parameter tx. You can use / and : in the channel names interchangeably for this feature, however a good convention to follow is use / for the path to the node, followed by a : to separate the node from the parameter name.
How to Confirm Exporting
From the Parameter
A parameter that is exported to will be highlighted in light blue. Clicking on the parameter name to display the parameter’s expression will display the path to the CHOP channel that is overriding the parameter. Alternatively you can right-click on the parameter's name and the pop-up menu will display an option to Jump to Export CHOP. Selecting this will take you directly to the CHOP the data is exported from.
NOTE: Sometimes you will need to play the framebar forward a few frames for the parameter to cook and become highlighted.
From the CHOP
If you go back and inspect the CHOP that the channel originates from, you will notice that the Export Flag is now on. You can toggle this flag on/off to activate/deactivate the export from this CHOP.
You can also quickly check if the a channel is exporting by holding down middle mouse button on a CHOP and inspecting the pop-up help info. The path reported to the right of the channel’s values is the path the channel exports to. This is convenient for a quick check, but it will not display multiple paths if the channel exports to multiple parameters (The first parameter’s path will be followed by ... if there are other parameter export paths).
To get a more complete report of all the parameters a CHOP channel exports to, open the CHOP Exporter. Right click on the CHOP and select CHOP Exporter... from the pop-up menu.
In the CHOP exporter you will see all the channels and all the parameters exported to.
Discovering Where the Channel Comes From
What if you forget where the parameter’s overriding channel is coming from?
Simply hold right mouse button down over the overridden parameter. When the pop-up menu appears, the last entry will be Jump to Export CHOP /CHOP’s path. You can then navigate your networks to this node, or selecting this menu option will take you directly to the node that is exporting the channel.
Removing an Export Connection
Disabling a CHOP’s Exports
- To disable all the exporting channels coming out of a CHOP, simply turn off that CHOP’s Export flag.
- Disabling the Export flag will stop all channels from exporting from this CHOP.
Removing a Single Channel Connection
- First identify the CHOP that the export channel originates from. See Section 4.1 above to learn how to do this.
- Right click on the CHOP and select CHOP Exporter ... from the pop-up menu.
- In the CHOP Exporter, locate the channel that is exporting to the parameter in question. Toggle the Export Flag beside the appropriate channel/parameter entry to disable that export.
The image below shows the export from chan1 to box1:sizex is disabled using the export flags in the CHOP Exporter.
Exporting from Null CHOPs
It is good practice to always export channels from a Null CHOP appended to the end of your network.
The reason for this is simple. If you export from the last node in your network, but decide later that you need to filter the data further, you would have to append the new filter CHOP and then redo all your export connections form this new node. Using a Null CHOP at the end of your network as an exporting place holder, you can always insert another node into the network directly before the Null. This will keep all your export connections intact.
It is also helpful to rename your Null CHOP to reflect the destination, like to_gearspeed.
Exporting to Toggles and Menus
Toggle checkboxes and parameter menus can be exported to as well. Drag & Drop the channel over the checkbox or menu, then select Export CHOP from the pop-up menu.
For toggle checkboxes, values <=0 are 'off' and values >0 are 'on'. For parameter menus, the first menu entry is selected when the CHOP channel value is 0, the second is selected when the value is 1, the third when the value is 2, and so on.
Using Expressions in Parameters
CHOP Exporting is setup from the CHOP channel to the parameter using the CHOP Exporter dialog or drag & dropping the channel. Alternatively, parameters can reference a CHOP channel using an expression in the parameter. This is a more parameter-centric approach, and the same expression can be used in multiple parameters. Use the chop expression to get a CHOP channel's value.
For example, for the CHOP
/project1/stimulate/math6 and channel
vidproc_motion, the following CHOP expression could be used: