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

    Noise - Keyframe Reduction using Python

    Cinema 4D SDK
    r21 python
    2
    3
    545
    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.
    • B
      brucek5
      last edited by

      Does anyone know of Python code to both remove keyframe noise and also perform keyframe reduction somewhat like the timeline keyframe reduce function? I'm importing face capture FBX files produced by the Apple ARKit which contains multiple morphs with keyframes on every frame. Some keys have very small changes that produces a "vibration" look, or sudden changes "spikes" that I manually delete. Then I perform the keyframe reduce function on each morph not only to remove keys, but to create a nice smooth curve giving the animation a more fluid, natural look.

      Another option is if anyone knows how (and if) the Cinema 4D keyframe reduce function can be called from Python.

      I'm using Cinema 4D R21.

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @brucek5
        last edited by ferdinand

        Hello @brucek5,

        thank you for reaching out to us and welcome to the Cinema 4D development community, the Plugin Café.

        Unfortunately, the "Key Reducer" and "Euler Filter" functions which can be found in Timeline Manager|Functions are not exposed in the Python or C++ SDK. Technically you can invoke most of the functions in Cinema 4D with their respective command id, in the case of "Key Reducer" you would have to invoke c4d.CallCommand(465001214). But since that functionality has a GUI and requires user inputs, this won't be very helpful in a script, as you would have then to make these inputs in the GUI and a simple script will block these.

        So, your only option is to implement your own key reducing routines when you want a fully automatic workflow.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • ferdinandF
          ferdinand
          last edited by ferdinand

          Hello @brucek5,

          without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022.

          Thank you for your understanding,
          Ferdinand

          MAXON SDK Specialist
          developers.maxon.net

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