@@ -91,42 +91,24 @@ def update_item_timeout(self):
91
91
log .info ("Update item: %s" % item_type )
92
92
93
93
if item_type == "clip" :
94
- c = None
95
- clips = get_app ().window .timeline_sync .timeline .Clips ()
96
- for clip in clips :
97
- if clip .Id () == item_id :
98
- c = clip
99
- break
100
-
101
- # Append to selected clips
102
- self .selected .append ((c , item_type ))
94
+ c = get_app ().window .timeline_sync .timeline .GetClip (item_id )
95
+ if c :
96
+ # Append to selected items
97
+ self .selected .append ((c , item_type ))
103
98
104
99
if item_type == "transition" :
105
- t = None
106
- trans = get_app ().window .timeline_sync .timeline .Effects ()
107
- for tran in trans :
108
- if tran .Id () == item_id :
109
- t = tran
110
- break
111
-
112
- # Append to selected clips
113
- self .selected .append ((t , item_type ))
100
+ t = get_app ().window .timeline_sync .timeline .GetTimelineEffect (item_id )
101
+ if t :
102
+ # Append to selected items
103
+ self .selected .append ((t , item_type ))
114
104
115
105
if item_type == "effect" :
116
- e = None
117
- clips = get_app ().window .timeline_sync .timeline .Clips ()
118
- for clip in clips :
119
- for effect in clip .Effects ():
120
- if effect .Id () == item_id :
121
- e = effect
122
- break
123
-
124
- # Filter out basic properties, since this is an effect on a clip
125
- self .filter_base_properties = ["position" , "layer" , "start" , "end" , "duration" ]
126
-
127
- # Append to selected items
128
- self .selected .append ((e , item_type ))
129
-
106
+ e = get_app ().window .timeline_sync .timeline .GetClipEffect (item_id )
107
+ if e :
108
+ # Filter out basic properties, since this is an effect on a clip
109
+ self .filter_base_properties = ["position" , "layer" , "start" , "end" , "duration" ]
110
+ # Append to selected items
111
+ self .selected .append ((e , item_type ))
130
112
131
113
# Update frame # from timeline
132
114
self .update_frame (get_app ().window .preview_thread .player .Position (), reload_model = False )
@@ -159,12 +141,10 @@ def update_frame(self, frame_number, reload_model=True):
159
141
parent_clip_id = effect .parent ["id" ]
160
142
161
143
# Find this clip object
162
- clips = get_app ().window .timeline_sync .timeline .Clips ()
163
- for c in clips :
164
- if c .Id () == parent_clip_id :
165
- # Override the selected clip object (so the effect gets the correct starting position)
166
- clip = c
167
- break
144
+ c = get_app ().window .timeline_sync .timeline .GetClip (parent_clip_id )
145
+ if c :
146
+ # Override the selected clip object (so the effect gets the correct starting position)
147
+ clip = c
168
148
169
149
# Get FPS from project
170
150
fps = get_app ().project .get ("fps" )
0 commit comments