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

    Record Keyframe of Object's property when it changes (Python; is it possible?)

    Cinema 4D SDK
    2
    3
    625
    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.
    • F
      Fowdy
      last edited by m_adam

      Hi!

      I am kind of new to C4D python coding. I have good grasp of the coding basics (if-else, for/while loops, booleans, etc), but I want to know if there is a way to record keyframe of an object's property when it changes.


      This is the rough draft of what I want to do:

      Using a User Data (Boolean) that is added to a Python Tag of a Null Object (used just to hold the tag), the code will record the keyframe of an Object's property as it changes when timeline is played (let's just say the Object's property is controlled by a node in XPresso Tag, so there's no keyframe)

      The User Data (Boolean) of the Python Tag is controlled by an XPresso Tag so that it detects whether or not the Object's property is changed

      Basically, as the timeline is playing and the Object's property is changing, the code will create keyframes for those changes


      Not sure if this is clear enough or not. Hopefully you guys can help me! I really want to learn this software so much.
      (I want to use this code for character animation, so if it is possible, may the method of recording the keyframes be "Record Animated"-like (R23 feature, basically only records the properties that are touched or animated))

      Thank you so much!

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @Fowdy first of all welcome in the plugincafe community.

        Since it's your first post no worry, but I've set up it correctly so please for the next one do it correctly see:

        • Q&A New Functionality
        • How to Post Questions.

        Regarding your question, I'm wondering if you are looking for Cappucino which let you record PSR while the timeline is playing.
        But the only drawback it does work only for PSR data.

        However, this is not clear if you want to interact with the viewport or not while the recoding occurs if not a solution could be that you animate the document via script and create specific keyframes, for more information about how to do it please find the next examples:

        • How to change the document time
        • To Creates KeyFrame for a specific parameter

        Do not hesitate to ask if there is anything you don't understand.
        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by

          Without more information, from your side, I've set up your topic as solved but feel free to re-open it.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

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