Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > PYTHON Development
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Before/After with Track/Curve GetValue?

 Post Reply Post Reply
Author
Message
Rick Barrett View Drop Down
Forum Moderator
Forum Moderator


Joined: 2002 Oct 29
Location: United States
Online Status: Offline
Posts: 58
Post Options Post Options   Quote Rick Barrett Quote  Post ReplyReply Direct Link To This Post Topic: Before/After with Track/Curve GetValue?
    Posted: 2017 Nov 14 at 4:04pm
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.

Back to Top
S_Bach View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2011 Jun 27
Online Status: Offline
Posts: 1330
Post Options Post Options   Quote S_Bach Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 15 at 1:45am
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

SDK Support Engineer
Back to Top
Rick Barrett View Drop Down
Forum Moderator
Forum Moderator


Joined: 2002 Oct 29
Location: United States
Online Status: Offline
Posts: 58
Post Options Post Options   Quote Rick Barrett Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 15 at 2:38pm
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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.109 seconds.