-
Q:How to create RT fx & Drop Shadow in FXScript?
Hello all,
I’ve created a simple script that adds a text label to a shot. Its based on the ‘Viewfinder’ filter. It works fine, but it won’t play back unrendered, while the ‘Viewfinder’ plays back fine unrendered. Does any one know what I should do so that my FXScript filter will playback in real time? I’ve pasted the code below. I’d also be grateful if anyone of you FCP gurus out there could tell me how to add a dropshadow option.
Thanks in advance!
Here’s the code:
scriptid "Shotnumber" //DO NOT LOCALIZE
filter "Shot Number G"; //Based on "Viewfinder" Filter
group "Video";
fullFrame;input str, "Shot #", text, "S010";
input fontname, "Font", FontList, "Arial";
input fontsize, "Size", slider, 40, 8, 1000 ramp 80 detent 20;
input scolor, "Color", color, 255, 255, 0, 0;
input origin, "Location", point, -0.32, 0.28;InvalEntireItem
RenderEachFrameWhenStillcode
float w, h, a, d, aspect;
point framesize, originpt, poly[4];
string snumstr;dest = src1;
resetText;
scolor.a = 255;dimensionsof(dest, framesize.x, framesize.y);
fontsize *= framesize.h/640;
setTextFont(fontname);
setTextSize(fontsize);
setTextStyle(kplain);
setTextJustify(kleftjustify);boundsof(dest, poly);
originpt = framesize;
originpt *= origin;aspect = aspectof(dest)
measurestringplain(str, w, h, a, d, aspect);
makerect(poly, originpt.x, originpt.y, w, a+d);
drawstringplain(str, poly, dest, scolor, aspect);