[PYTHON] Useful when debugging with TouchDesigner

debug () instead of print ()

print () is the output method used in Python, but in TouchDesigner you can use a function called debug () instead where you can use print (). With the output, debug () can see where it was called from which operator and on which line. This is useful in most cases when debugging with TouchDesigner.

--Comparison of print and debug debug.jpg

Troubleshooting_in_TouchDesigner#Command:_debug

CrashAutoSave for files that cannot be opened or have initial defects

Sometimes I write an infinite loop, or something I don't understand causes the file to crash or not open. When a crash occurs, CrashAutoSave.toe is automatically generated, but you can also start the toe file you created in safe mode by prefixing the file name with CrashAutoSave.. If you start it in safe mode, you can check and correct the contents without running any processing without the project. After modifying the contents, you can fix the file that could not be opened by removing CrashAutoSave. from the file name, saving it, and reopening the file.

When you open the file with CrashutoSave., the dialog like the image below will appear first. SafeModeDialog.jpg

When you press OK to start Touch Designer, the timeline does not run and the word Safe Mode appears in the center of the screen. Since you can edit the operator etc. in this state, you can correct the defective part, extract only the necessary part and copy and paste it to another file. SafeMode.jpg

Troubleshooting_in_TouchDesigner#Crash_Auto_Save Safe Mode

Error DAT and Error Dialog

Lists errors and warnings in your project

Dialogs -> Errors errorDialog.jpg

op Find DAT

You can search for operators in the project by specifying filters etc. There are many values that can be taken

Open in non-commercial mode

It can be used to check if it works with Non-Commercial when distributing sample files etc. to those who do not have a license at workshops. Since it is not possible to change licenses quickly, it is easier to limit from the script.

Non-commercial license restrictions


app.addNonCommercialLimit('password')  #Limits
app.removeNonCommercialLimit('password') #Release

Resolution limit


app.addResolutionLimit(1280, 720, 'secret123') #Limits
app.removeResolutionLimit('secret123') #Release

Click here for details → https://docs.derivative.ca/App_Class#Methods

Reference links

-Official Wiki Troubleshooting -TouchDesigner Performance Measurement -TouchDesigner python script and CHOP Execute execution order

Recommended Posts

Useful when debugging with TouchDesigner
This and that useful when used with nohup
Debugging C / C ++ with gdb
[Python] Super useful debugging
Debugging pipelines with metaflow
Easy debugging with ipdb
When using optparse with iPython
When moss with pip install
Class when inferring with fairseq
Error when playing with python
Remote debugging with Visual Studio 2017
Tips you should know when programming competitive programming with Python2 (useful library)
When coverage fails with _sqlite3 error
Precautions when installing tensorflow with anaconda
How to add sudo when debugging
Transactions when operating PostgreSQL with Psycopg2
When matplotlib doesn't work with python2.7
When using MeCab with virtualenv python
Precautions when using six with Python 2.5
[Python] Format when to_csv with pandas