Animation running or just button pressed?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/10/2008 at 07:43, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.1 
    Platform:   Windows  ; Mac  ;  
    Language(s) :     C++  ;

    ---------
    Hi,

    OK, this is difficult to explain...

    In my plugin object I calculate the velocity of several objects in the scene by storing their position in an array and comparing the stored positions with the current positions when the plugin is executed next time.

    This works fine while the animation is running.

    But the problem is: When I e.g. stop the animation, or click somewhere in the ObjectManager, the plugin is executed again. Since in that case no scene time has passed since the last execution, the last and current positions are the same and the resulting velocity is zero.

    How can I detect of the animation is running or if the user just clicked somewhere, so I can prevent the unnecessary storing of data?

    Thanks for any help!

    Greetings,
    Jack



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/10/2008 at 08:12, xxxxxxxx wrote:

    Addition:

    CheckIsRunning(CHECKISRUNNING_ANIMATIONRUNNING) does not exactly do what I want. When the animation is running and I click the animation control button to stop the animation, the second execution of the plugin (when releasing the mouse button) still gets a TRUE out of CheckIsRunning().

    Cheers,
    Jack



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/11/2008 at 02:53, xxxxxxxx wrote:

    Use op->GetDirty(DIRTY_MATRIX) to check if the matrix of an object has changed.

    cheers,
    Matthias


Log in to reply