[PPRO] Added missing args and types to ComponentParam and TrackItem#133
[PPRO] Added missing args and types to ComponentParam and TrackItem#133GreenDuckStudio wants to merge 2 commits intodocsforadobe:masterfrom
Conversation
|
Additionally, there are some updateUI arguments that are not documented. I added them in all the places where I know they exist. |
| setColorValue(alpha: number, red: number, green: number, blue: number, updateUI: boolean): boolean | ||
| /** | ||
| * interpolationType must be one of the following: | ||
| * 0 KF_Interp_Mode_Linear | ||
| * 1 kfInterpMode_EaseIn_Obsolete | ||
| * 2 kfInterpMode_EaseOut_Obsolete | ||
| * 3 kfInterpMode_EaseInEaseOut_Obsolete | ||
| * 4 KF_Interp_Mode_Hold | ||
| * 5 KF_Interp_Mode_Bezier | ||
| * 6 KF_Interp_Mode_Time | ||
| * 7 kfInterpMode_TimeTransitionStart | ||
| * 8 kfInterpMode_TimeTransitionEnd | ||
| * */ | ||
| setInterpolationTypeAtKey(time: Time, interpolationType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, updateUI?: boolean): boolean |
There was a problem hiding this comment.
Instead create an enum conforming to the TIME_FORMAT:
declare enum INTERPOLATION_TYPE {
KFINTERPMODE_Linear,
KFINTERPMODE_EaseIn_Obsolete,
KFINTERPMODE_EaseOut_Obsolete,
KFINTERPMODE_EaseInEaseOut_Obsolete,
KFINTERPMODE_Hold,
KFINTERPMODE_Bezier,
KFINTERPMODE_Time,
KFINTERPMODE_TimeTransitionStart,
KFINTERPMODE_TimeTransitionEnd,
}
And then use it in the parameter type:
setInterpolationTypeAtKey(time: Time, interpolationType: INTERPOLATION_TYPE, updateUI?: boolean): boolean
| * | ||
| */ | ||
| readonly components: any | ||
| readonly components: Component[] |
There was a problem hiding this comment.
| readonly components: Component[] | |
| readonly components: ComponentCollection |
| setInterpolationTypeAtKey(time: Time, interpolationType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8, updateUI?: boolean): boolean | ||
| setValue(value: any, updateUI?: boolean): boolean | ||
| setValueAtKey(): boolean | ||
| setValueAtKey(time: Time, value: any, updateUI: boolean): boolean |
There was a problem hiding this comment.
| setValueAtKey(time: Time, value: any, updateUI: boolean): boolean | |
| setValueAtKey(time: Time, value: any, updateUI?: boolean): boolean |
| /** | ||
| * threshold in ticks | ||
| */ | ||
| findNearestKey(timeToCheck: Time, threshold: number): object |
There was a problem hiding this comment.
No need for the comment, and ticks usually come as string if I'm not mistaken
| /** | |
| * threshold in ticks | |
| */ | |
| findNearestKey(timeToCheck: Time, threshold: number): object | |
| findNearestKey(timeToCheck: Time, thresholdInTicks: string): object |
| * threshold in ticks | ||
| */ | ||
| findNearestKey(timeToCheck: Time, threshold: number): object | ||
| findNextKey(timeToCheck: Time): object |
There was a problem hiding this comment.
time to check doesn't add much context / explanation. Better to leave it as time
| findNextKey(timeToCheck: Time): object | |
| findNextKey(time: Time): object |
| */ | ||
| findNearestKey(timeToCheck: Time, threshold: number): object | ||
| findNextKey(timeToCheck: Time): object | ||
| findPreviousKey(timeToCheck: Time): object |
There was a problem hiding this comment.
| findPreviousKey(timeToCheck: Time): object | |
| findPreviousKey(time: Time): object |
| getValue(): any | ||
| getValueAtKey(): any | ||
| getValueAtTime(): any | ||
| getValueAtKey(timeToCheck: Time): any |
There was a problem hiding this comment.
| getValueAtKey(timeToCheck: Time): any | |
| getValueAtKey(time: Time): any |
|
For both the initial PR and the suggested changes: Did these only get added to the API in PPro 15.0? If not, please make sure these are included in all of the appropriate typedefs, not just the latest. |
I fixed the Track item components, replacing any type with the correct Component[] type.
Additionally, I added several missing arguments in the functions of the ComponentParam class.