Last active
September 17, 2020 08:46
-
-
Save tokejepsen/b5e579a8a43e8e69923a5d03ad12a923 to your computer and use it in GitHub Desktop.
NukeStudio select by tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hiero | |
seq = hiero.ui.activeSequence() | |
tag_names = ["fluffy", "compositing"] | |
item_names = [] | |
for video_track in seq.videoTracks(): | |
for item in video_track.items(): | |
for tag in item.tags(): | |
if tag.name().lower() in tag_names: | |
print item | |
item_names.append(item.name()) | |
selection_tracks = ["cuts", "reviews", "proxies"] | |
items = [] | |
for video_track in seq.videoTracks(): | |
if video_track.name() not in selection_tracks: | |
continue | |
for item in video_track.items(): | |
if item.name() in item_names: | |
items.append(item) | |
te = hiero.ui.getTimelineEditor(seq) | |
te.setSelection(items) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment