OpenShot Video Editor  2.0.0
transition.py
Go to the documentation of this file.
1 ##
2 #
3 # @file
4 # @brief This file is for legacy support of OpenShot 1.x project files
5 # @author Jonathan Thomas <jonathan@openshot.org>
6 #
7 # @section LICENSE
8 #
9 # Copyright (c) 2008-2018 OpenShot Studios, LLC
10 # (http://www.openshotstudios.com). This file is part of
11 # OpenShot Video Editor (http://www.openshot.org), an open-source project
12 # dedicated to delivering high quality video editing and animation solutions
13 # to the world.
14 #
15 # OpenShot Video Editor is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation, either version 3 of the License, or
18 # (at your option) any later version.
19 #
20 # OpenShot Video Editor is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
24 #
25 # You should have received a copy of the GNU General Public License
26 # along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
27 #
28 
29 import uuid
30 
31 
32 ##
33 # This class represents a media clip on the timeline.
34 class transition:
35 
36  # ----------------------------------------------------------------------
37  ##
38  # Constructor
39  def __init__(self, name, position_on_track, length, resource, parent, type="transition", mask_value=50.0):
40 
41  # init variables for clip object
42  self.name = name
43  self.position_on_track = float(position_on_track) # the time in seconds where the transition starts on the timeline
44  self.length = float(length) # the length in seconds of this transition
45  self.resource = resource # Any grey-scale image, or leave empty for a dissolve
46  self.softness = 0.3 # 0.0 = no softness. 1.0 = too soft.
47  self.reverse = False
48  self.unique_id = str(uuid.uuid1())
49  self.parent = parent # the sequence
50 
51  # mask settings
52  self.type = type # transition or mask
53  self.mask_value = mask_value # 0.0 to 1.0
54 
55  # init vars for drag n drop
56  self.drag_x = 0.0
57  self.drag_y = 0.0
This class represents a media clip on the timeline.
Definition: transition.py:34
def __init__
Constructor.
Definition: transition.py:39