Fx script - Problem with transition

Hi !


I have to do a transition script for Final Cut for college, and i've a problem : i want to have a transition like in this picture : http://pix.toile-libre.org/upload/original/1333312212.jpg. But i've only found how to do all these lines at the same time... I've tried to divide and multiply the variable "ratio", but the result isn't what i want... Can you help me ? I can't test my code except when i'm in class because i don't have a mac... Here is the code :


transition "Traits";

group "Balayage";


input nbLignes, "Nombre de lignes", slider, 10, 1, 100 label "lignes"

input direction, "Direction de départ", popup, 1, "gauche a droite", "droite a gauche", "haut vers bas", "bas vers haut"


code


float hauteur, largeur, dx, i;

region rgn, rgn2;

point poly[4];

for i = 0 to 3

poly[i] = {0, 0};

next

MakeRegion(poly, rgn);

DimensionsOf(dest, largeur, hauteur);

if (direction < 3)

dx = hauteur / nbLignes;

for i = 1 to nbLignes

poly[0] = {-largeur / 2, -hauteur / 2 + (i-1)*dx};

poly[1] = {-poly[0].x, poly[0].y};

poly[2] = {-poly[0].x, poly[0].y + dx};

poly[3] = {poly[0].x, poly[2].y};


scale(poly, poly[(i+direction) % 2], ratio, 1);

MakeRegion(poly, rgn2);

rgn += rgn2;

next

RegionCopy(src1, src2, dest, rgn, 0);

else

dx = largeur / nbLignes;

for i=1 to nbLignes

poly[0] = {-largeur / 2 + (i-1)*dx, -hauteur/2};

poly[1] = {poly[0].x + dx, poly[0].y};

poly[2] = {poly[1].x, -poly[0].y};

poly[3] = {poly[0].x, poly[2].y};


scale(poly, poly[(i+direction) % 2 + 1], 1, ratio);

MakeRegion(poly, rgn2);

rgn += rgn2;

next;

RegionCopy(src1, src2, dest, rgn, 0);

end if

Final Cut Pro X, Other OS

Posted on Apr 1, 2012 1:37 PM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Fx script - Problem with transition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.