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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Before/After with Track/Curve GetValue?

    PYTHON Development
    0
    3
    514
    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
      Helper
      last edited by

      On 14/11/2017 at 16:04, xxxxxxxx wrote:

      When calling CTrack.GetValue() or CCurve().GetValue(), it doesn't appear that the track Before and After (Continue, Oscillate, Offset Repeat, Repeat) are taken into account.

      Is there some way to get the correct value at a specific time with the Before / After? Animating the document isn't an option for me as this is for an expression.

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

        On 15/11/2017 at 01:45, xxxxxxxx wrote:

        Hello,

        you can use Remap() to map a point in time outside the track range into a point in time within the track. See also the CTrack Manual.

        This obviously won't help to calculate values for CLOOP_CONTINUE. It seems the only build-in functions that can calculate the continued values are the internal functions of the C++ API AnimateTrack() and Animate(). So I'm afraid there are no functions in the Python API able to perform this specific calculation.

        You could of course get the tangents of the first or last key of the animation track and perform the calculation yourself.

        best wishes,
        Sebastian

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

          On 15/11/2017 at 14:38, xxxxxxxx wrote:

          Thanks - Remap + some custom coding around Continue seems to have done the trick.

          Surprised Remap uses float rather than BaseTime - both from an SDK consistency standpoint and because the Python docs say the arg should be BaseTime. But I've got it sorted out now.

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