Copy link to clipboard
Copied
Hi, I want to add/remove key frames of 'Position' and 'Scale' effects of a sequence at different time positions in a CEP panel. How can I do this in a CEP panel?
See the aptly-named 'playWithKeyframes' function, in the PProPanel sample. 🙂
Copy link to clipboard
Copied
See the aptly-named 'playWithKeyframes' function, in the PProPanel sample. 🙂
Copy link to clipboard
Copied
playWithKeyframes function has only Gaussian blur example. But I want position and scale effect key framing example.
Copy link to clipboard
Copied
Look through the available clip.components.
Copy link to clipboard
Copied
In Position component, how can I able to set it's value? Unlike other components (Scale, Opacity), it has two values. I want to set both values individually. But I don't know how to access or set it's value. Can I able to set it's value by positionComponent.setValueAtKey()? Do I need to pass values as an array in the above function? please give me some sample code!
 
Copy link to clipboard
Copied
var seq = app.project.activeSequence;
if (seq) {
var firstVideoTrack = seq.videoTracks[0];
if (firstVideoTrack) {
var firstClip = firstVideoTrack.clips[0];
if (firstClip) {
var clipComponents = firstClip.components;
if (clipComponents) {
var motion = clipComponents[1];
if (motion) {
var position = motion.properties[0];
var posValue = position.getValue();
var newPosValue = [.6, .6];
var setResult = position.setValue(newPosValue, true);
}
}
}
}
}
Copy link to clipboard
Copied
Thank you very much for your reply. It works perfectly!