I want to write a mel script to generate a report for cloth simulating, including every frame number and how much time has been spent to reach certain frame.
if use while loop to detect the change, waste too much cpu resource, which should be used on simulating.
any idea on it? Thanks a lot.
by the way, I used the command "timerX" to calculate elasped time. is it the correct way?
USe a expression that uses a global var to keep the time from next frame and then print the difference between currebt time and that time (and sets the last frame time to the current time). Shoul be invoked each frame.
thanks a lot. almost get it. still have one problem, since the script is involked automatically in every frame and begin to count time before i press the play button. so the time from first frame to second frame has problem. is there a way to detect the action of clicking the play button?
still have another question, it seems that even complex mel script could be run in expression. then what is the main difference between sourcing mel script and place the script in expression? thanks.