mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
fix(nks): clean up of the script
This commit is contained in:
parent
c6a3911f56
commit
d4294eccd9
1 changed files with 4 additions and 6 deletions
|
|
@ -26,10 +26,10 @@ class CollectClips(api.ContextPlugin):
|
|||
# get all subTrackItems and add it to context
|
||||
effects_on_tracks = []
|
||||
sub_track_items = []
|
||||
|
||||
# looop trough all tracks and search for subtreacks
|
||||
for track_index, video_track in enumerate(sequence.videoTracks()):
|
||||
sub_items = video_track.subTrackItems()
|
||||
items = video_track.items()
|
||||
sub_items = video_track.subTrackItems()
|
||||
if not sub_items:
|
||||
continue
|
||||
for si in sub_items:
|
||||
|
|
@ -43,8 +43,6 @@ class CollectClips(api.ContextPlugin):
|
|||
if (track_index not in effects_on_tracks):
|
||||
effects_on_tracks.append(track_index)
|
||||
|
||||
# self.log.debug("_>_ effects_on_tracks `{}`".format(effects_on_tracks))
|
||||
# self.log.debug("_|_ sub_track_items `{}`".format(sub_track_items))
|
||||
# add it to context
|
||||
context.data["subTrackUsedTracks"] = effects_on_tracks
|
||||
context.data["subTrackItems"] = sub_track_items
|
||||
|
|
@ -56,7 +54,7 @@ class CollectClips(api.ContextPlugin):
|
|||
media_type = "core.Hiero.Python.TrackItem.MediaType.kVideo"
|
||||
if str(item.mediaType()) != media_type:
|
||||
continue
|
||||
except:
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
track = item.parent()
|
||||
|
|
@ -93,7 +91,7 @@ class CollectClips(api.ContextPlugin):
|
|||
try:
|
||||
head, padding, ext = os.path.basename(source_path).split(".")
|
||||
source_first_frame = int(padding)
|
||||
except:
|
||||
except Exception:
|
||||
source_first_frame = 0
|
||||
|
||||
instances_data.append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue