Page 1 of 1

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

PostPosted: Sun Feb 07, 2021 1:36 am
by Ryan Bloomer
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?