Layer script processing order and number of times run
Posted: Mon Jan 26, 2009 11:00 am
We need layer scripts to be processed BEFORE updating the screen and run only "once" on a frame and only run as needed when bones or points are moved.
Here are the issues involved currently:
Multiple Activation Of Layer Scripts Per Frame
Layer scripts run at least 3 times on each frame. This can be avoided using scripting so that it only runs once per frame but this won't work for scripts that need continuous processing when bones or points are changed.
The layer script runs a "minimum" of 3 times but if there is any user action, like moving or rotating a bone or points it is run over and over many many many many times, each time causing a slow down in performance. Currently just clicking once on the screen will run the layer script 3 times as it does with entering the frame. Faster computers may not see this performance hit but it still exists and the multiple running of layer scripts is unneccessary and a waste of processing resources.
Layer Scripts And Screen Update "Order"
A layer script seems to be processed and "run" after the frame is displayed and updated. On each frame a layer script is actually one frame "behind". This means that any changes caused by the script require this function to update the view:
Unfortunately this function can cause a performance hit. It is only needed once per frame but can end up being called many times due to the fact that the script runs so multiple times during any user interaction.
-----
The requested "fix" or "feature" would be the following:
Run the layer script immediately when entering the frame. Any "updating" of the view done by AS internally should occur AFTER the script has been executed. This would eliminate a scripted "update".
Run the layer script ONCE per frame. If there is any user action like moving bones or points then the script should run continuously while this action is performed but only as often as AS updates normally when moving bones or points. The script should not run multiple times for each interaction by the user.
-vern
Here are the issues involved currently:
Multiple Activation Of Layer Scripts Per Frame
Layer scripts run at least 3 times on each frame. This can be avoided using scripting so that it only runs once per frame but this won't work for scripts that need continuous processing when bones or points are changed.
The layer script runs a "minimum" of 3 times but if there is any user action, like moving or rotating a bone or points it is run over and over many many many many times, each time causing a slow down in performance. Currently just clicking once on the screen will run the layer script 3 times as it does with entering the frame. Faster computers may not see this performance hit but it still exists and the multiple running of layer scripts is unneccessary and a waste of processing resources.
Layer Scripts And Screen Update "Order"
A layer script seems to be processed and "run" after the frame is displayed and updated. On each frame a layer script is actually one frame "behind". This means that any changes caused by the script require this function to update the view:
Code: Select all
layer:UpdateCurFrame()
-----
The requested "fix" or "feature" would be the following:
Run the layer script immediately when entering the frame. Any "updating" of the view done by AS internally should occur AFTER the script has been executed. This would eliminate a scripted "update".
Run the layer script ONCE per frame. If there is any user action like moving bones or points then the script should run continuously while this action is performed but only as often as AS updates normally when moving bones or points. The script should not run multiple times for each interaction by the user.
-vern