lib/edl/event.rb in edl-0.0.4 vs lib/edl/event.rb in edl-0.0.5
- old
+ new
@@ -76,13 +76,19 @@
evt
end
# Returns true if the clip starts with a transiton (not a jump cut)
def has_transition?
- !transition.nil?
+ !!@transition
end
-
+ alias_method :starts_with_transition?, :has_transition?
+
+ # The duration of the incoming transition, or 0 if no transition is used
+ def incoming_transition_duration
+ @transition ? @transition.duration : 0
+ end
+
# Returns true if the clip ends with a transition (if the next clip starts with a transition)
def ends_with_transition?
outgoing_transition_duration > 0
end
@@ -126,10 +132,10 @@
# Speed of this clip in percent relative to the source speed. 100 for non-timewarped events
def speed
@timewarp ? @timewarp.speed : 100
end
-
+
# Returns true if this event is a generator
def generator?
black? || (%(AX GEN).include?(reel))
end
end
\ No newline at end of file