-
Letterbox Matte plug-in
hey all,
a little while back i posted the text for an FX script to make a basic letterbox matte generator.
well it turns out that I should really have tested it first. Doh!so I’m posting it again below, on the grounds that handing out broken plug-in code doesn’t really help the greater good! anyway ….hopefully its working this time. if anyone has a moment to test it please let me know if its working or not for you.
open up the FXBuilder [Tools>FXBuilder], then cut and paste the text below into the Editor window… create it [FXBuilder>Create Plugin…] give it a name, and save it into your /Library/Application Support/Final Cut Pro System Support/Plugins folder.
cheers
Andy// —————-
// Plugin Text follows
// —————-scriptid “Andy’s Letterbox” //DO NOT LOCALIZE
generator “Andy’s Letterbox”, 120;
group “Matte”;
AlphaType(kblack);input fillcolor, “Color”, color, 0, 0, 0, 0;
input letterboxWidth, “Size”, slider, 25, 0, 100 detent 25;
input letterboxOffset, “Offset”, slider, 0, -100, 100 detent 0;
input invertAlpha, “Invert”, checkbox, 0;code
exposedbackground=1;float width, height;
point poly[4], centerpoint;boundsOf(Dest, poly);
centerOf(poly, centerpoint);
dimensionsof(dest, width, height);scale(poly, centerpoint, 1, (100-letterboxWidth)/100);
offset(poly, 0, (height * letterboxWidth * letterboxOffset) / 20000);image matteBars[width][height];
channelfill(matteBars, fillcolor.a, fillcolor.r, fillcolor.g, fillcolor.b);fillpoly(poly, Dest, kwhite);
channelCopy(Dest, Dest, KAlpha, KNone, KNone, KNone);if !invertAlpha
InvertChannel(Dest, Dest, 1, 0, 0, 0);
end if;channelCopy(matteBars, Dest, KNone, KRed, KGreen, KBlue);