I just learned about the timers and TimerCallbacks. This is really exciting to me as I found out how to run events on a regular basis, whether a scene or running or not.
So you can have a traffic light change colors all the time, or a draw bridge go up and down on a regular basis.
The problem is if you don't call the Unregister or Stop methods on the timer, the timer stays running. You can close IClone and it goes away, but I would like to know the proper way to clean up resources upon a close.
I know what to call:
# Unregister the callback18 timer.UnregisterPyTimerCallback()
I just don't know the "proper" place to put it.
Your example here:
http://wiki.reallusion.com/IC_Python_API:RLPy_RPyTimer
Shows the call to Unregister it right after it shows the call to Start it.
# Start the Timer16 timer.Start()17 # Unregister the callback18 timer.UnregisterPyTimerCallback()
The Python compiler in my brain which is brand new, looks at that and says we just turned off the one we just started.
Is that correct?
I am real excited to know about this. There are lots of props or scene ideas I can think of that a timed event is better than something animated.
I would pay for a Bat Hot Line to the API team to get some answers. I am willing to make videos for what I learn if you will share the information with me.
Thanks for any advice on best practices for cleaning up a Plug-in.
Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor