0% found this document useful (0 votes)
90 views2 pages

Twix It - JSX

The document contains JavaScript code that processes video footage in After Effects. It precomposes selected layers, adjusts Twixtor settings for frame interpolation, then precomposes the layer with Twixtor applied, setting the time remapping to maintain the original duration.

Uploaded by

sazu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views2 pages

Twix It - JSX

The document contains JavaScript code that processes video footage in After Effects. It precomposes selected layers, adjusts Twixtor settings for frame interpolation, then precomposes the layer with Twixtor applied, setting the time remapping to maintain the original duration.

Uploaded by

sazu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

app.

beginUndoGroup("lanky's struggle 😩👌");

var active_item= app.project.activeItem;


var props = active_item.selectedProperties;
var frame_duration = active_item.frameDuration;
var active_Layer = active_item.selectedLayers[0];
for (p=0; p<props.length; p++) {
if (props[p].numKeys>1) {
t1=props[p].keyTime(1);
for (k=2; k<=props[p].numKeys; k++) {
val = props[p].keyValue(k);
props[p].removeKey(k);
props[p].setValueAtTime( t1 + frame_duration*(k-1) , val);
}
}
}
var hamid = [active_Layer.index]
var first_key = props[0].keyTime(1)
var last_key = props[0].keyTime(props[0].numKeys)
active_Layer.inPoint = first_key;
active_Layer.outPoint = last_key+frame_duration;
var precomp_1 =
active_item.layers.precompose(hamid,"footage_precomp_"+active_Layer.name,true);
var precomp_1_layer = active_item.selectedLayers[0];
precomp_1_layer.inPoint = first_key;
precomp_1_layer.outPoint = last_key+frame_duration;

var frame_rate = 1/frame_duration


var twixtor = precomp_1_layer.Effects.addProperty("Twixtor Pro");

{/* T H I S I S W H E R E Y O U C H A N G E T W I X S E T T I N
G S */}

twixtor.property("Use GPU").setValue(1);
twixtor.property("Input: Frame Rate").setValue(frame_rate); {/* !~!~!~ I
wouldn't recommend touching this one !~!~!~! */}
twixtor.property("Motion Vectors").setValue(5);
twixtor.property("Image Prep").setValue(2);
twixtor.property("Frame Interp").setValue(2);
twixtor.property("Warping").setValue(3);
twixtor.property("Main_BG Sensitivity").setValue(100);

{/* T H I S I S W H E R E Y O U C H A N G E T W I X S E T T I N
G S */}

var precomp_2 = active_item.layers.precompose(hamid,"Twixtor_precomp_",true);


var precomp_2_layer = active_item.selectedLayers[0];
precomp_2_layer.inPoint = first_key;
precomp_2_layer.outPoint = last_key+frame_duration;

precomp_2_layer.timeRemapEnabled = true;
precomp_2_layer.timeRemap.setValueAtTime(first_key,first_key);
precomp_2_layer.timeRemap.setValueAtTime(last_key,last_key);

app.endUndoGroup();

You might also like