what am i doing wrong here. if i put the code in to a text and run it will do what i want
but when i put the code in to the script in a momentary button i get a error.
check the file for what i mean.
I am trying to build a button to open the preferences pane so i dont have to code a entire user interface for every little detail par window mess up.toe (5.38 KB)
The error messages that Touch gives you are usually very helpful for debugging. In this case, when I click the ‘Momentary’ button, the Panel Execute DAT throws an error. If I middle mouse click on the OP, the info box says ‘Error: Unknown command: op’.
op()
is the Python function TouchDesigner uses to select OPs, and the code you wrote is correct Python code — the problem is that the OP was set to use T-script (TouchDesigner’s other scripting language) instead of Python.
If you click the ‘T’ icon in the upper right of the parameter box, the icon will switch to the Python logo and your network will run just fine.
Im still a little new with TD and have taken on a huge task in learning and building.
I missed that one little check box. everyday i am learning the power of the software