Python - GetName() - lists and use outside of Resolve

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

Ryan Bloomer

  • Posts: 844
  • Joined: Tue Jul 09, 2013 6:58 pm

Python - GetName() - lists and use outside of Resolve

PostSun Feb 07, 2021 1:36 am

Currently when using GetName(), python doesn't seem to out put resolve's PyRemoteObject, as a list.

for example if we fetch the items on track one of a timeline:
Code: Select all
timeline = project.GetCurrentTimeline()
items = timeline.GetItemsListInTrack("video",1)
print(items)


We return a dictionary of PyRemoteObjects.

But if loop through that dictionary and try to get the human readable name of each key , it doesn't seem to store as a list.

I would expect the following to give a human readable name in a list:
Code: Select all
timeline = project.GetCurrentTimeline()
items = timeline.GetItemsListInTrack("video",1)

for s in items:
     itemName = s.GetName()


when printing itemName, it does print out the display names in the loop, but I can't figure out how to store the list in a human readable format. The work around currently is to use the PyRemoteObject's keys as a newly assigned name, but it gets messy quickly.

Anyone have any ideas?

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], dirk-pel, Fully_Loaded34, KrunoSmithy, qsipher, Robert John and 264 guests