-
Notifications
You must be signed in to change notification settings - Fork 125
[PPRO] Added missing args and types to ComponentParam and TrackItem #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -1250,7 +1250,7 @@ declare class TrackItem { | |||
/** | |||
* | |||
*/ | |||
readonly components: any | |||
readonly components: Component[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonly components: Component[] | |
readonly components: ComponentCollection |
setValue(value: any, updateUI?: boolean): boolean | ||
setValueAtKey(): boolean | ||
setValueAtKey(time: Time, value: any, updateUI: boolean): boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findPreviousKey(timeToCheck: Time): object | |
findPreviousKey(time: Time): object |
getColorValue(): any[] | ||
getKeys(): any[] | ||
getValue(): any | ||
getValueAtKey(): any | ||
getValueAtTime(): any | ||
getValueAtKey(timeToCheck: Time): any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.