As far as I know, there is no direct way to determine the camera or angle used in the timeline.
For the MediaPool item, there is a property for "Angle" and "Camera #"
- Code: Select all
item.GetProperty('Angle')
or
- Code: Select all
item.GetProperty('Camera #')
but unfortunately the clips in the timeline refer to the multi-camera clip and not to the source clips.
But there is a small workaround:
The angle or camera# (depending on the setting when creating a multi-camera clip)
is appended to the name of the timeline element.
So you can use this python code to get the information:
- Code: Select all
import DaVinciResolveScript
resolve = DaVinciResolveScript.scriptapp('Resolve')
project_manager = resolve.GetProjectManager()
project = project_manager.GetCurrentProject()
current_timeline = project.GetCurrentTimeline()
current_item = current_timeline.GetCurrentVideoItem()
current_mp_item = current_item.GetMediaPoolItem()
clipname = current_item.GetName()
multiclipname = current_mp_item.GetName()
angle = clipname.replace(multiclipname + " - ", "")
print(angle)