Bug: Unique timeline names are enforced, but not always

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

roger.magnusson

  • Posts: 3388
  • Joined: Wed Sep 23, 2015 4:58 pm

Bug: Unique timeline names are enforced, but not always

PostThu Mar 30, 2023 8:12 pm

A big issue with the current Resolve scripting API is that there's no way to find the Media Pool Item that represents a Timeline.

The only way is to search through all the bins for a clip that matches the name of the timeline. However, while Resolve enforces unique timeline names when you create or rename a timeline regardless of which bin it's in, it doesn't enforce unique timeline names when you paste a timeline to another bin.

I feel that being able to paste a timeline into another bin while keeping the timeline name is a bug. Seeing as we're not allowed to rename a timeline to be the same name as another timeline in another bin.

Pasting a timeline to the same bin shows the expected behavior of appending "copy" to the timeline name.
Offline
User avatar

roger.magnusson

  • Posts: 3388
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Bug: Unique timeline names are enforced, but not always

PostFri Mar 31, 2023 10:05 pm

I just found that pasting a timeline into a parent bin adds the "copy" suffix. Pasting into a sub bin retains the original timeline name.
Offline
User avatar

Igor Riđanović

  • Posts: 1596
  • Joined: Thu Jul 02, 2015 5:11 am
  • Location: Los Angeles, Calif.

Re: Bug: Unique timeline names are enforced, but not always

PostFri Mar 31, 2023 11:52 pm

Maybe I misunderstand, you're trying to identify which mediapool items are timelines? This would do it:

Code: Select all
#!/usr/bin/env python

# Get a list of timelines in the current Resolve bin.
# Igor Ridanovic, metafide.com

def get_timelines_list(bin):

    binItems = bin.GetClipList()
    timelinesInThisBin = []

    for i in binItems:
        itemProperties = i.GetClipProperty()
        if itemProperties['Type'] == 'Timeline':
            timelinesInThisBin.append(i)

    return timelinesInThisBin



if __name__ == '__main__':
    projectManager = resolve.GetProjectManager()
    currentProject = projectManager.GetCurrentProject()
    mediaPool = currentProject.GetMediaPool()
    currentBin = mediaPool.GetCurrentFolder()

    timelines = get_timelines_list(currentBin)
www.metafide.com - DaVinci Resolve™ Apps
Offline
User avatar

roger.magnusson

  • Posts: 3388
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Bug: Unique timeline names are enforced, but not always

PostSat Apr 01, 2023 1:09 am

That's the approach I guess most people are using, but there are two issues with it:
  1. Timelines can have duplicate names if they're copied to a subfolder, so you can't be sure which Media Pool Item is the right one if you're matching it with a Timeline object.
  2. The "Type" property is a translated property and basing code logic on it will fail if the Resolve GUI is set to another language.

The way I approach these issues now is that I offer the user the opportunity to automatically rename duplicate timelines first, to make them unique. And for the "Type" property I translate from whichever language Resolve is set to, but it will of course break if there are more or updated translations.

Both are bad workarounds. ;)

Return to DaVinci Resolve

Who is online

Users browsing this forum: dennisdepijper, nictau, VMFXBV and 179 guests