Copy link to clipboard
Copied
I noticed that the CC2017 update to Premiere Pro brought in a new Component API, which provides access to Clip Keyframes. Awesome.
The problem is that the API isn't documented. The nearest thing to documentation is Bruce Bullis' "Play With Keyframes" PProPanel sample. However, as used in that sample, the specifics about the API are super vague.
With most other Premiere APIs, the ExtendScript Toolkit's Object Model Viewer provides you with useful information like expected types or whether a value is readonly. The Component API is mysteriously missing from the Object Model Viewer, however. The only indication that it exists at all is that the TrackItem class contains a readonly components property of type ComponentCollection. I dove into this a little bit with some test scripts and was able to determine a bit more information about the APIs but I've not figured out everything. At this point I'd simply like to get input from those-in-the-know, rather than push for diminishing returns.
I've codified what I've found (and combined it with some info gleaned from the PProPanel project) into the TypeScript typings listed below. I'm pretty certain I've got ComponentCollection, Component, and ComponentParamCollection figured out. The ComponentParam class, however, contains a lot of incomplete information. By default I marked everything with no function parameters and a void return type.
declare class ComponentCollection
{
readonly numItems: number;
}
declare class Component
{
readonly displayName: string;
readonly matchName: string;
readonly properties: ComponentParamCollection;
}
declare class ComponentParamCollection
{
readonly numItems: number;
}
declare class ComponentParam
{
readonly displayName: string;
addKey(): void;
areKeyframesSupported(): boolean;
findNearestKey(): void;
findNextKey(): void;
findPreviousKey(): void;
getKeys(): Array<Time>;
getValue(): number;
getValueAtKey(): void;
isEmpty(): boolean;
isTimeVarying(): boolean;
keyExistsAtTime(): boolean;
removeKey(): void;
removeKeyRange(startTimeSeconds:number, endTimeSeconds: number, shouldUpdateUI: boolean): void;
setInterpolationTypeAtKey(): void;
setTimeVarying(varying: boolean): void;
setValue(): void;
setValueAtKey(): void;
}
Could someone in the know help fill in the blanks here?
> I take it this is currently "incomplete but being actively developed"?
Yep; that's what I was going for, with "vestigial".
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I just realized I pasted the wrong link. See if this helps: objects — Bryson Michael
Copy link to clipboard
Copied
jskibickiiii wrote
I just realized I pasted the wrong link. See if this helps: objects — Bryson Michael
I'm aware of Bryson's [helpful] page, but you'll note that it doesn't contain any documentation for the Component API: none of the Component types appear in his documentation.
As for the TypeScript type declaration file you previously linked, I'm the original author of that document. The Component APIs listed there were added manually after identifying them in the system through various debugging sessions. They work but there is no real documentation for them anywhere.
Bruce Bullis, any update on producing/maintaining some API documentation? The TypeScript type declaration file would be an excellent place to do so. I know you have maintained the api_doc.html file in the past, but it's languished a bit of late. The TypeScript type declaration file has the benefit of being less verbose in plain-text format (readable and searchable), as well as functional in the certain environments.
The community would gladly do the work but we do not have the app-side insight to be able to generate the documentation in the first-place. The Object Model Viewer in the ESTK actually performs some kind of communication with Premiere Pro to generate the contents of its browser (saw this occur with the update to CC 2018: ESTK needed Premiere Pro to be open in order to generate the "documentation"... an incomplete list of available APIs and expected types with no supporting comments whatsoever).
Copy link to clipboard
Copied
Here are some vestigial API docs.
Copy link to clipboard
Copied
Bruce Bullis wrote
Here are some vestigial API docs.
I take it this is currently "incomplete but being actively developed"? Currently has extremely limited content and nothing related to the Component API (yet?).
That said, going with Sphinx is an interesting move...
Copy link to clipboard
Copied
> I take it this is currently "incomplete but being actively developed"?
Yep; that's what I was going for, with "vestigial".