Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How to track user changes to parameter animation

    Cinema 4D SDK
    r21 c++
    3
    5
    886
    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.
    • A
      AiMiDi
      last edited by

      x8qas-6obj9.gif
      As I demonstrated above, how to track the user's changes to the parameter animation in a custom ObjectPlugin, or receive a message when the user changes the animation. Do I need to listen to the above events in ObjectData::Message()?Can someone help me?

      Thank,
      AiMiD

      1 Reply Last reply Reply Quote 0
      • kbarK
        kbar
        last edited by kbar

        To detect the value changing you can override the SetDParameter(...) method. Not sure about an animated value though.

        https://developers.maxon.net/docs/cpp/2023_2/class_node_data.html#a01cc573d65703c02dcbe65fc98dee065

        https://www.gamelogicdesign.com
        https://www.plugins4d.com

        A 1 Reply Last reply Reply Quote 0
        • ManuelM
          Manuel
          last edited by

          hi,

          As kent said you must override SetDParameter. This function should be caled who/whatever have changed the value of the attribut.

          You can have information on this post about the difference with SetDParameter and MSG_DESCRIPTION_POSTSETPARAMETER

          As the post suggest, you can have more information in our manual about SetDParameter and Messages specially MSG_DESCRIPTION_POSTSETPARAMETER

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • A
            AiMiDi @kbar
            last edited by

            @kbar and @m_magalhaes, Thank you for your reply.
            I know that parameter changes can be determined by overriding SetDParameter().
            But I don't know how to override SetDParameter() to know whether the user has added / deleted keyframes, or changed the value of keyframes (whether the small button next to the parameter is pressed). Thank you again for your help.

            Thank,
            AiMiD

            1 Reply Last reply Reply Quote 0
            • ManuelM
              Manuel
              last edited by

              hi,

              There is no really way of doing it. The only way is to keep track of what is going on. the number of keys, the position, values etc.
              When setDparameter is called you need to compare and update your data.
              You could just store the dirty state or a lot more information. Keep in mind that you can have mutiple tracks for the position. This is tricky and long to do but possible.

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

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