This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float remap(float value, float inMin, float inMax, float outMin, float outMax){ | |
return (outMax - outMin) * (value - inMin) / (inMax - outMin) + newMin; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def onCellChange(dat, cells, prev): | |
for eachCell in cells: | |
if eachCell.col == 0: | |
if eachCell == 1: | |
targetRows = dat.row(eachCell.row) | |
sumOfRows = sum([int(val) for val in targetRows[1:]]) | |
op('table2')[eachCell.row, 0] = sumOfRows | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ivec3 CoordsFrom2DArray( vec3 size, int id ){ | |
float xCoord = mod(float(id), size.x); | |
float yCoord = fract( (float(id) / (size.x * size.y)) ) * size.y; | |
float zCoord = (float(id) / (size.x * size.y * size.z)) * size.z; | |
return ivec3(int(xCoord), int(yCoord), int(zCoord)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: generic format for an autodstart | |
{pathToTouchDesigner} {pathToToe} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: -R sets reapeat | |
:: --fullscreen sets player in full screen mode | |
{pathToVLC} {pathToFile} -R --fullscreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Touch Working files | |
################### | |
*.*.toe | |
CrashAutoSave.toe | |
TouchDesignerCrash*.dmp | |
# dependencies | |
dep/python | |
# log files # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: echo | |
:: Display messages on screen, turn command-echoing on or off. | |
:: "%~dp0" | |
:: The %~dp0 (that's a zero) variable when referenced within a Windows batch file will expand to | |
:: the drive letter and path of that batch file. The variables %0-%9 refer to the command line | |
:: parameters of the batch file. %1-%9 refer to command line arguments after the batch file name. | |
:: %0 refers to the batch file itself. | |
:: as a note this CMD or BAT needs to run as admin in order to work correctly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
toe_file = 'path\\to\\your\\file.toe' | |
# set environment variable | |
toe_env_var = 'controller' | |
os.environ['STARTUP'] = toe_env_var | |
os.startfile(toe_file) | |
print("startting file with {}".format(toe_env_var)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: echo | |
:: Display messages on screen, turn command-echoing on or off. | |
:: "%~dp0" | |
:: The %~dp0 (that's a zero) variable when referenced within a Windows batch file will expand to | |
:: the drive letter and path of that batch file. The variables %0-%9 refer to the command line | |
:: parameters of the batch file. %1-%9 refer to command line arguments after the batch file name. | |
:: %0 refers to the batch file itself. | |
:: as a note this CMD or BAT needs to run as admin in order to work correctly |