Skip to content

Commit 61aa4b0

Browse files
[#1363] (Fix) Added keyframes of currently selected clips as markers for easy navigation
Previous commit was missing code for NextMarker & formatting baddness as suggested here : #1363 (comment)
1 parent 97dbc80 commit 61aa4b0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/windows/main_window.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ def actionPreviousMarker_trigger(self, event):
12471247
if selected_clip:
12481248
all_marker_positions.append(selected_clip.data["position"])
12491249
all_marker_positions.append(selected_clip.data["position"] + (selected_clip.data["end"] - selected_clip.data["start"]))
1250-
# add all keyframes. itterate on all properties of Data,, and for each every Points
1250+
# add all keyframes. itterate on all properties of Data, look for each points
12511251
for property in selected_clip.data :
12521252
try :
12531253
for point in selected_clip.data[property]["Points"] :
@@ -1313,6 +1313,19 @@ def actionNextMarker_trigger(self, event):
13131313
if selected_clip:
13141314
all_marker_positions.append(selected_clip.data["position"])
13151315
all_marker_positions.append(selected_clip.data["position"] + (selected_clip.data["end"] - selected_clip.data["start"]))
1316+
# 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
13161329

13171330
# Loop through selected transitions (and add key positions)
13181331
for tran_id in self.selected_transitions:

0 commit comments

Comments
 (0)