to check if you are in perform mode, place a Perform CHOP and set it to only output the “Perform Mode” channel. To execute some python code whenever you start perform mode, connect a Chop Execute DAT to that CHOP output, and add your code within its onOffToOn function.
I just implemented your perform mode for a solver, and works excellent. Thank you very much.
I just buy a commercial license because I will do an installation. I will copy all the folder with assets, however, I will use a player. Do I need to change path of all my files, or touch recognize the folder project, or is there a way to collect my project in order to dont lose any path?
The best thing to do is to use relative paths for all your assets. This way it is easy to move the project to another machine. Everything works the same for TouchPlayer.
The folder where the .toe file resides is called the project folder.
Place all your assets in subdirectories of this folder, for instance a folder “assets” which has another subdirectory “movies”.
Then load your assets in the Movie File in TOP(and others) by using a file path like: assets/movies/mymovie.mov
Also you can get the path of the current project folder in Python by using project.folder
See the Project Class wiki page
Hi, I implement the act on star perform mode, however, it is not working when I start in perform mode or player mode. Is only working from design mode to perform mode.
I’m not sure what you mean.
But the Perform CHOP shows you if you are in Perform mode yes or no, and the script triggers only when that channel goes from 0 to 1. This is useful in TouchDesigner where you can switch between network editor (perform=0) to perform mode(perform=1)
TouchPlayer can only run in perform mode (there is no network editor in TouchPlayer) so I guess the perform channel will always be 1 in TouchPlayer, so it will never switch from 0 to 1, so your reset script will not be triggered.
So when would you like to trigger that reset in TouchPlayer? Upon start? Use an Execute DAT for that and toggle the ‘on start’.
Does that help?