1.5 Using an External Text Editor
Small Python scripts can be created and edited inside of TouchDesigner, but as scripts grow, an external text editor can save a lot of time and trouble.
There are a number of helpful features gained by editing scripts in an external text editor. Without creating an extensive list, some reasons include:
Line numbering
Colour coded syntax
Find & Replace functionality
Auto-completion
These features add up to a far richer, and more efficient experience when working extensively with Python inside of TouchDesigner.
Open the ’Preferences’ dialog found in the ’Edit’ menu
Go to the ’DATs’ preferences
Click the file browser icon for the ’Text Editor’ setting
Assign the the external editor’s executable (.exe) by selecting it and clicking ’Open’. This is usually located in the ’Program Files’ folder
Click ’Accept’ on the Preferences dialog
Once the setup is complete, right click on a DAT and click the ’Edit Contents’ option. The DAT will be opened in the program which is specified by this preference. A separate ’Table Editor’ preference is available to set the external editor used for DATs that are tables.
Two well-respected editors that are used frequently in the TouchDesigner community, and are crossplatform, are linked below:
Sublime Text 3 http://www.sublimetext.com/
Notepad++ http://notepad-plus-plus.org/
{pagebreak}