Re: FCPX current playhead and identifying a clip in FxPlug
Re: FCPX current playhead and identifying a clip in FxPlug
- Subject: Re: FCPX current playhead and identifying a clip in FxPlug
- From: Daniel Walz <email@hidden>
- Date: Tue, 23 May 2017 15:11:16 +0100
Thanks Darrin,
that was again very helpful. However I am having problems with 2) and
4), please see below.
Thanks again,
Daniel
On Mon, May 22, 2017 at 10:05 PM, Darrin Cardani <email@hidden> wrote:
>
> Daniel,
>
> A few comments inline below:
>
> On May 19, 2017, at 3:21 PM, Daniel Walz <email@hidden> wrote:
>
> Hi Darrin,
>
> thanks for your answers, that brings me a few steps forward.
>
> On Fri, May 19, 2017 at 7:15 PM, Darrin Cardani <email@hidden> wrote:
>>
>> Daniel,
>>
>> You mention that you are working on an audio generator and that you’ve written an FxGenerator. It’s not clear what you’re trying to accomplish, but FxPlug doesn’t currently support audio reading or writing at all.
>
>
> [...]
>>
>> To answer your questions:
>>
>> 1) You can get the current playhead time by using the -[FxCustomParameterActionAPI currentFxTime:] method.
>
>
> Great, I overlooked that. That should do the trick.
>
>>
>> 2) The XML should contain the UUID of your generator. You may have to decode the data before you can get to the UUID, though. I haven’t looked at FCPX XML in a while.
>
>
> Yes, that is the half that I know. But I need to know the UUID inside the generator as well, so I can import the generated clip and link it to the originating generator. Can I access the UID from an API inside the generator?
>
> You can obtain your own UUID by reading in your plug-in’s Info.plist file and getting the value of the “uuid” key from the ProPlugPluginList dictionary.
>
I see. But I think we talk of different UIDs. The UID in the XML seems
to be the path of the motion template. But what I am after is a way to
identify the clip in the XML during running the generator, so I can
generate a XML-Workflow to place the rendered output grouped with the
generator clip. The generator clip I want to group looks like this:
<video name="Filmstro" lane="-1" offset="154154/24000s" ref="r4"
duration="7672665/120000s" start="86486400/24000s">
followed by the parameters. How can I identify that at runtime?
>
>> 3) You cannot hide the controls of anything other than your own generator.
>
> That is a pity, but I can live with that.
>>
>> 4) I’ll have to ask about this one.
>
> This is still very important for us and the FCPX/Filmstro users ;-) Thanks in advance for checking that…
>
> So the answer for this is that the curve editor in FCPX will only show the ability to edit a parameter’s value and time if the parameter goes from 0 to 100%. I’m not sure if you have to mark it as a percentage parameter or not, but that should be easy to test out. Otherwise, it only allows the user to move the keyframe in time, but not in value.
>
That doesn't seem to work. I changed my parameters to go from 0 - 100:
[parmsApi addFloatSliderWithName:@"Volume" parmId:kVolumeParamID
defaultValue:100.0 parameterMin:0.0 parameterMax:100.0
sliderMin:0.0 sliderMax:100.0 delta:1.0
parmFlags:kFxParameterFlag_DEFAULT];
I also found a checkmark in Motion "Show in Keyframe editor", but that
seems to be unrelated for the publish, at least it didn't change the
behaviour for me - I re-saved project in motion, removed the clip in
FCPX from the timeline and added a new one. Still there is no option
in FCPX to expand the keyframe editor to 2-D, as the Compositing /
Opacity keyframes do.
What did you mean with mark it as percentage? I didn't see an option
for that in the docs, and kFxParameterFlag_ have no option.
However, it has the opposite flag:
kFxParameterFlag_CURVE_EDITOR_HIDDEN. What is the intention of that
flag? I tried it anyway, but setting it also made no difference.
>> 5) If your generator is not adding images, you shouldn’t be using a generator. That is their sole purpose. Having said that, no, there’s no way to tell that a preview is being rendered vs. a regular render, nor is there a way to tell which preview is being rendered.
>
> I know I am bending the architecture a bit, but just because I didn't find to add an to be rendered audio clip into the timeline, see above...
> But I found out, that adding the information into the motions generator large.png and small.png thumbnails is ok for a start.
>
>> 6) You can right click next to the parameter’s name to bring up the menu which will allow you to publish the button. It’s a little confusing, unfortunately.
>
>
> Ah I see, that's indeed not obvious. But I am happy, it works that way.
>
> BTW, it would make sense for me to generate the audio from the same call as the video render. Is there eventually a callback from FCPXs render call, or will that only perform the renderOutput calls for each frame?
>
>
> There are only the calls to -renderOutput:, there’s no additional callback.
>
> Darrin
>
>
> Thanks a lot for your time,
>
> Daniel
>
>
>> Darrin
>>
>> On May 16, 2017, at 7:51 AM, Daniel Walz <email@hidden> wrote:
>>
>> Dear fellow developers,
>>
>> currently I am working on an audio generator plugin. So far I created a FxGenerator. But I have a few questions:
>>
>> 1) Is there an API to get the current state of playback, like playing, playhead and selected clip?
>>
>> 2) Is there a way to mark a generator clip so I can recognise it in the XML later on, so I can create a compound clip around the generator and the generated/ingested audio?
>>
>> 3) Can I hide the visual controls in the timeline for transform, trim, distort andCompositing?
>>
>> 4) When I publish the parameters (addFloatSliderWithName), it will only show one dimensional keyframes. What do I have to specify to get a 2-D keyframe (value over time) like e.g. the opacity?
>>
>> 5) Can I display a pictogram in the thumbnails in the timeline? I want something like the "Placeholder" clip. Because our generator is not adding any images, I want to show the user a distinction to video clips (like displaying a note symbol or alike). Is that possible?
>>
>> 6) If I add a button using "addPushButtonWithName", it shows up in motion, but I cannot publish it. Is there a setting I didn't see, or is there a technical reason not to have a button in FCPX? I wanted it to trigger an offline render step.
>>
>>
>> Sorry for that long email, and thanks for all insights,
>>
>> Daniel
>>
--
Daniel Walz | Software Developer
Filmstro | Music that Moves.
www.filmstro.com | twitter/filmstro | vimeo/filmstro
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden