Quote:
Originally Posted by mikeytown2
I think i have it fixed now.
|
Almost, but I think you've still got one of the boundary conditions wrong.
Since the last frame of a clip is actually
framecount-1, this value (rather than
framecount) should be the max allowed for
end (and mapped internally to 0).
Also, it might be clearer to replace:
Code:
#Funkey Conditions
start = (start == 0) ? -1 : start
start = (start == 1) ? 0 : start
#Perform Cut
return start == -1 ?
\Eval(transition + "(d, c.trim(" + string(end+1) + ", 0), " + string(duration) + opts + ")"):
\end == 0 ?
\Eval(transition + "(c.trim(0, " + string(start-1) + "), d, " + string(duration) + opts + ")"):
\Eval(transition + "(c.trim(0, " + string(start-1) + "), c.trim(" + string(end+1) + ", 0), " + string(duration) + opts + ")")
by
Code:
# Select uncut frames (or blanks) as transition components:
clip1 = (start == 0) ? d : c.trim(0, -start)
clip2 = (end == 0) ? d : c.trim(end+1, 0)
# Perform transition:
Eval(transition + "(clip1, clip2," + string(duration) + opts + ")")
The effect is the same, but this way it seems clearer what the special cases are and how they are handled. (And by always using the negative Trim argument to select the first
start frames, start=1 is no longer a special case)
Gavino