Questions about Perform Mode

Hi,

Several newbie questions about the Perform Mode:

  • When entering in Perform Mode, is there a re-initialization of anything? Is the animation restarted at 0?

  • Is there a way to know in code that we enter, we are and we leave the Perform Mode, so that we can generate special events at those times?

Thanks a lot

No, nothing is reinitialized or reset when you enter perform mode. It’s just opening a different window with different settings and putting content into that.

There is no script callbacks for that right now. However entering perform mode with F1 is simply a script that’s executed, so you can customize that script however you want.

I am not accustomed to macros yet but as far as I understand them they are local, aren’t they? In other words if I modify the F1 macro and I share my .toe or .tox the new behavior will very likely not be shared.

How can I be sure that whenever a project is performed a given script is activated?
It may be nice to have callbacks for that state, maybe.

Beside, when I right click on the F1 macro in the Macros Editor and I choose Edit Macro in Text Editor, nothing happens.
I use Notepad++ for text editing the DATs and it works great, but in this case it appears the script is not opened.

Thank you.

The macros will be saved in the .toe file, so they will work when you share the file.

It’s a little messy right now in 088, since macros are still only tscript and we haven’t added a way to directly control hotkeys in Python yet.
What you can do is add a new Root macro for F1 and have it run a Python script run /myscript . Don’t try to edit the Built-In macro, you can’t do that. The Root one will take precedence though.

And in that script you can have python code that does whatever you want.

Thank you very much.
I am still on 077 now but good to know for the future :wink:

Ah, in that case you can have your custom macro run a tscript script then.