PDA

View Full Version : question about layer


matrix
19th February 2005, 03:53
I'm using this function to move a clip around:

function move(clip clip, clip LClip, int start_frame,
\ int end_frame,
\ int centerX,
\ int centerY,
\ int center2X,
\ int center2Y)
{

return Animate(start_frame , end_frame, "layer", clip, LClip, "add", 255, centerX, centerY,
\ clip, LClip, "add", 255, center2X, center2Y)
}

clip=avisource("D:\clip.avi")
a=clip.trim(100,699).bicubicresize(140,100)
move(clip, a,100, 300, 94, -100, 94, 120)

I was wondering if I can have the layer's operation and level parameters, optional.
What I mean is, if not specified, use the default, wich would be "add",255, and if specified, use whatever you specify.

And if possible, what would the function look like?

FuPP
19th February 2005, 05:09
Function move(clip clip, clip LClip, int start_frame,
\ int end_frame,
\ int centerX,
\ int centerY,
\ int center2X,
\ int center2Y,
\ string "mode",
\ int "strength")

{
mode = default(mode,"add")
strength = default(strength,255)

return Animate(start_frame , end_frame, "layer", clip, LClip, mode, strength, centerX, centerY,
\ clip, LClip, mode, strength, center2X, center2Y)
}


Regards,
FuPP

matrix
19th February 2005, 14:09
Beautiful. Thank you.