dcolacino wrote:The released version of Resolve 18 still shows only usage of a media pool clip in the currently open timeline. There's no way to find which timelines use a clip in the media pool! This may not be a bug, but it's a feature of Premiere that's sorely missed in Resolve, so +1.
Even Public Beta 19 still doesn't solve this.
I've found this frustrating as well, as I work with projects that can contain upwards of 300 timelines, and you sometimes really want to know where a certain clip has been used.
Fed up with waiting, I've written a very clumsy script that can be called from the console. It takes a few seconds to execute but it will list all sequences of the current project in which a particular clip is used.
I'm sure this can be streamlined / expanded in various ways, but my scripting skills are extremely limited.
Especially, one could extend it to include all projects in the database, compound clips etc.
Just don't have time to do it. Any takers?
In any case I still wish something like this would be implemented in the media pool.
For those who haven't used scripting, here's how it works.
Call up the console (Menu Workspace >> Console)
Click on the button for Python 3 ("Py3")
Paste the code below at the prompt and hit enter. (You only need to paste the code once per session)
Call the script by typing find_tl("clipname") and pressing enter.
This lists all the timelines' names that contain the clip, either in a video or audio track.
The
clipname needs to be the exact name the clip has in the bin.
One caveat, I do not know if this works without Python 3 installed on the system. (It is on mine, Mac OS)
You're welcome.
- Code: Select all
import sys
def find_clip_recursive(folder, clip_name):
# Get all clips in the current folder
clips = folder.GetClips()
# Search for the clip in the current folder
for clip in clips.values():
if clip.GetName() == clip_name:
return clip
# Recursively search through subfolders
subfolders = folder.GetSubFolders()
for subfolder in subfolders.values():
found_clip = find_clip_recursive(subfolder, clip_name)
if found_clip:
return found_clip
return None
def find_tl(clip_name):
# Get the current project
app = bmd.scriptapp("Resolve")
project_manager = app.GetProjectManager()
if not project_manager:
print("Failed to get project manager.")
return
project = project_manager.GetCurrentProject()
if not project:
print("No project is open.")
return
# Get the media pool
media_pool = project.GetMediaPool()
if not media_pool:
print("Failed to get media pool.")
return
# Find the clip
root_folder = media_pool.GetRootFolder()
clip = find_clip_recursive(root_folder, clip_name)
if clip is None:
print(f"Clip '{clip_name}' not found in the media pool.")
return
# Find timelines containing the clip
timelines_with_clip = []
for i in range(project.GetTimelineCount()):
timeline = project.GetTimelineByIndex(i+1)
timelinename = timeline.GetName()
# Check if the clip exists in the timeline
found = False
for track_index in range(timeline.GetTrackCount("video")):
items = timeline.GetItemListInTrack("video", track_index + 1)
print(f"Searching timeline no. '{i}' video track '{track_index + 1}'", end="\r")
for item in items:
if item.GetName() == clip_name:
timelines_with_clip.append(timeline.GetName())
lastfoundtimeline = timeline.GetName()
found = True
break
if found:
break
if found == False:
for track_index in range(timeline.GetTrackCount("audio")):
items = timeline.GetItemListInTrack("audio", track_index + 1)
print(f"Searching timeline no. '{i}' audio track '{track_index + 1}'", end="\r")
for item in items:
if item.GetName() == clip_name:
timelines_with_clip.append(timeline.GetName())
found = True
break
if found:
break
# Print the list of timelines containing the clip
if timelines_with_clip:
print("\r", f"Timelines containing clip '{clip_name}':")
for timeline_name in timelines_with_clip:
print(timeline_name)
else:
print(f"No timelines contain clip '{clip_name}'.")