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: Thu, 25 May 2017 18:25:44 +0100
Hi Darrin,
> You can always have custom data in your parameters that is of whatever form you want. That way the plug-in would know whatever is in its parameters.
Yes, that will be the workaround. That's not too bad. I am just not
sure if that will allow me to craft an XML workflow that can reference
the generator clip. But I will try
> vertical editing in the curve editor in FCPX, it needs to be rigged and the rig’s slider needs to go from 0 to 100
Awesome, I will try that out tomorrow first thing...
Thanks once more,
Daniel
On Thu, May 25, 2017 at 6:16 PM, Darrin Cardani <email@hidden> wrote:
> Daniel,
>
> I’m not very familiar with FCPX XML, so I’m not sure I fully understand what
> you’re trying to do with #2. You can always have custom data in your
> parameters that is of whatever form you want. That way the plug-in would
> know whatever is in its parameters. (And those parameters can be hidden so
> they don’t show up in the UI.) But I don’t think there’s any way for a
> plug-in to get its ID within FCP’s project graph, if that’s what you’re
> after.
>
> For #4, it seems that in order for a parameter to allow vertical editing in
> the curve editor in FCPX, it needs to be rigged and the rig’s slider needs
> to go from 0 to 100. Otherwise, it will just allow you to edit the time of
> the keyframes. So you can do the following in your Motion Template:
>
> 1) Open the inspector for your plug-in
> 2) Click on the pop-up menu for the parameter you want the user to be able
> to edit using the curve editor in FCPX
> 3) Click “Add to Rig” and select “Create New Rig” and then “Add to New
> Slider”
> 4) This will create a new Rig in your Motion Template named “Slider” which
> by default goes from 0 to 100
> 5) You can rename the Rig by Double-clicking on the name “Slider” in the
> layer list and entering a new name
>
> Now when you add the generator to the timeline in FCPX and bring up the
> curve editor, you can select the Rigged Slider as the parameter to show and
> you’ll see the disclosure triangle on the right side. Click it and it should
> expand to allow editing both the value and time of the parameter.
>
> Darrin
>
> On May 23, 2017, at 7:11 AM, Daniel Walz <email@hidden> wrote:
>
> 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
>
>
--
Daniel Walz | Software Developer
Filmstro | Music that Moves.
Sussex Innovation Centre | Science Park Square | Brighton, BN1 9SB
email@hidden | Personal mobile: +44 7491 836 008
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