Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Animation running or just button pressed?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 210 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post