On 08/08/2013 at 13:15, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R13-R14
Platform:
Language(s) : C++ ;
---------
I want to find out if animation is really happening, that is: The timeline cursor is moving, either one frame by clicking one of the navigation buttons, or being dragged by the mouse or running at full speed.
The Execute flags normally will do the job:
// Not animating:
EXPRESSION CACHEBUILDING INDRAG
or
EXPRESSION CACHEBUILDING
// Animating:
ANIMATION EXPRESSION CACHEBUILDING
The problem arises when the ANIMATION flag is set, even if there is no change in the frame number. For example, if I delete a tag, then invoke undo, the Execute event triggers, with the ANIMATION flag set. I need to find a way to prevent this.. or at least find a way to detect that it is no "real" animation.
The reason I want this is because I have some code that runs when the user repositions objects, changes values and so on. But I do not want, nor need, this code to be executed when the "real" animation takes place, in order to save CPU power.
At the same time, there is some important value checking that has to be carried out, only when there is no animation. When doing the Undo (inserting previously deleted tag), this check is not carried out, because my code is fooled by the ANIMATION flag. But in such cases, the code has to run..
Here is the short-form:
I need a TIMELINE_CURSOR_IS_MOVING flag..
Any ideas?