Okay, it wasn't obvious, but I fixed the problem of my last email when I finally that I need to initialize the FxKeframeInfo by calling the macro FxInitKeyframeInfo(key1); (that wasn't obvious to me that I needed to do that :-)).
So here's my question: Let's say I put two keyframes on a 30 frame animation of a slider, one at time 0 and one at time 10.
Then I use this as a template for use within FCP and apply it to a 300 frame clip.
So I figured since you report the duration to our effect as a 30 frame duration, because that's how the template is stored, that you would adjust the keyframes so that my keyframes at time 0 and 10 should now be at frames 0 and 100. No, the keyframes are still at frame 0 and 10 on the 300 frame sequence. This is true for what the user sees as well as the keyframe suite internally. So I'm reported that my clip is 30 frames long, with keyframe at times 0 and 10 of a 30 frame sequence, but the user sees the keyframe at frame 10 of a 300 frame sequence. However frame 10 reported to the plugin is not frame 10 reported to the user. They user sees the keyframe at a proportional time distance of 10/300 (3.333%) into the clip, whereas my plugin sees it as 10/30 (33.3333%) into the clip.
Also, if I were to request param info at time f (f is floating point) of a slider param using FxParameterRetrievalAPI_v2, do you guys do the same time offset math for regular params that you do for image params. If so, how am I supposed to reconcile that with the time info passed to/from the keyframe api? NOTE: I'm not asking you use the same offset math that you do for getInputBitmap, because that's causing me grief as I've described.
Yet another argument to provide backward-compatible timing options in FCP in the API (that is, not scale duration changes between templates and FCP clips). I'm assuming there are loads of places in the API that you deal with time where trying to go back and forth between Motion-template-scaled time and FCP time will need to happen… just asking for inconsistencies and trouble.
(oh , the reason I'm testing the keyframe API, is that I thought I could get a time step, or scale duration difference, by putting keyframes at time 0 and 1 in my motion template, and in the particular case above I was hoping to get that the scaled keyframe times would be at 0 and 0.1 (because I was applying a 30-frame template to a 300 frame clip in FCP) instead of 0 and 1… thus I was hoping to account for duration scale differences between my Motion templates and the FCP clip/group it was applied to). Pete
So I'm trying to retrieve keyframes from a param (checkbox) that has 2 keyframes. I KNOW that there are two keyframes because
[keyFrameApi channelCount:&chans forParam:kSmartBlendCheckBoxID]; Returns 2 for chans.
Here's my code: keyFrameApi = [_apiManager apiForProtocol:@protocol(FxKeyframeAPI)]; FxKeyframeInfo key1; error1 = [keyFrameApi keyframeInfo: &key1 forParam:kSmartBlendCheckBoxID channel:0 andIndex:0];
Here is what I get as the error message: The operation couldn’t be completed. KeyframeInfo.version (1606673280) is too new in -[FxPlugAPIHandler(KeyframeHandler) keyframeInfo:forParam:channel:andIndex:]
Am I doing something wrong? Pete
|