@@ -1248,18 +1248,7 @@ def actionPreviousMarker_trigger(self, event):
1248
1248
all_marker_positions .append (selected_clip .data ["position" ])
1249
1249
all_marker_positions .append (selected_clip .data ["position" ] + (selected_clip .data ["end" ] - selected_clip .data ["start" ]))
1250
1250
# add all keyframes. itterate on all properties of Data, look for each points
1251
- for property in selected_clip .data :
1252
- try :
1253
- for point in selected_clip .data [property ]["Points" ] :
1254
- log .info ("point : %s" , point )
1255
- keyframe = (point ["co" ]["X" ]- 1 )/ fps_float - selected_clip .data ["start" ] + selected_clip .data ["position" ]
1256
- if keyframe > start and keyframe < stop :
1257
- all_marker_positions .append (keyframe )
1258
- except TypeError :
1259
- log .info ("%s : %s : not itterable" , property , selected_clip .data [property ])
1260
- pass - except KeyError :
1261
- log .info ("%s : %s : has no points" , property , selected_clip .data [property ])
1262
- pass
1251
+ addKeyframesToMarkers (selected_clip .data )
1263
1252
1264
1253
# Loop through selected transitions (and add key positions)
1265
1254
for tran_id in self .selected_transitions :
@@ -1314,19 +1303,7 @@ def actionNextMarker_trigger(self, event):
1314
1303
all_marker_positions .append (selected_clip .data ["position" ])
1315
1304
all_marker_positions .append (selected_clip .data ["position" ] + (selected_clip .data ["end" ] - selected_clip .data ["start" ]))
1316
1305
# add all keyframes. itterate on all properties of Data, look for each points
1317
- for property in selected_clip .data :
1318
- try :
1319
- for point in selected_clip .data [property ]["Points" ] :
1320
- keyframe = (point ["co" ]["X" ]- 1 )/ fps_float - selected_clip .data ["start" ] + selected_clip .data ["position" ]
1321
- if keyframe > start and keyframe < stop :
1322
- all_marker_positions .append (keyframe )
1323
- except TypeError :
1324
- log .info ("%s : %s : not itterable" , property , selected_clip .data [property ])
1325
- pass
1326
- except KeyError :
1327
- log .info ("%s : %s : has no points" , property , selected_clip .data [property ])
1328
- pass
1329
-
1306
+ addKeyframesToMarkers (selected_clip .data )
1330
1307
# Loop through selected transitions (and add key positions)
1331
1308
for tran_id in self .selected_transitions :
1332
1309
# Get selected object
@@ -1358,6 +1335,20 @@ def actionNextMarker_trigger(self, event):
1358
1335
get_app ().window .refreshFrameSignal .emit ()
1359
1336
get_app ().window .propertyTableView .select_frame (frame_to_seek )
1360
1337
1338
+ def addKeyframesToMarkers (self , data ):
1339
+ for property in data :
1340
+ try :
1341
+ for point in data [property ]["Points" ] :
1342
+ keyframe = (point ["co" ]["X" ]- 1 )/ fps_float - data ["start" ] + data ["position" ]
1343
+ if keyframe > start and keyframe < stop :
1344
+ all_marker_positions .append (keyframe )
1345
+ except TypeError :
1346
+ log .info ("%s : %s : not itterable" , property , data [property ])
1347
+ pass
1348
+ except KeyError :
1349
+ log .info ("%s : %s : has no points" , property , data [property ])
1350
+ pass
1351
+
1361
1352
def actionCenterOnPlayhead_trigger (self , event ):
1362
1353
""" Center the timeline on the current playhead position """
1363
1354
self .timeline .centerOnPlayhead ()
0 commit comments