Re: FCPX current playhead and identifying a clip in FxPlug
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=filmstro-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=EltxWFF7D/idhCFPdoj/UK3uaKmBW7h4KDpb2jRsUrQ=; b=023S+gKZur3R7/9HJ1WOXgwkOpdZSjMqGwjTZbvyPzIbGeLdsfooYhWraiRl3WjOwE 8JrefDtCzSg3xuzlLMIN151z0oHJsmTTtG5zTLBM3K+1zmKbubyXv55jQ5ivkuTxP9mF JzAG6jLA31woHGvEuwT1Jfz1Ad2y07pJOZIxAAJ4U4wfYba96vGC7jH2EPyfO8sjZNOL kFoNeHPkNkk5TVZr7d7ORfgL0UwNW8kAg6xnG0Q/C76SymlBAlLg9A9SKmVL9v553kOg j1wf+8we0P9Z01PK1N2RdYP3gc9ID+F8dv/cqsWwr7d9eYdL95OLwL4f/Y0BuD4gMXtv 2WLQ== 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 <dcardani@apple.com> wrote:
Daniel,
A few comments inline below:
On May 19, 2017, at 3:21 PM, Daniel Walz <daniel@filmstro.com> 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 <dcardani@apple.com> 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 <daniel@filmstro.com> 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 (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Daniel Walz