Resolve Scripting - how to access multicams?

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

MarcusWolschon

  • Posts: 771
  • Joined: Sun Apr 14, 2013 6:59 pm

Resolve Scripting - how to access multicams?

PostThu Nov 29, 2018 7:08 pm

I finaly found a workaround to get some Resolve Scripting in Python going.
viewtopic.php?f=21&t=78611&p=459047#p459047

Now my first problem...
the API reference in
%ProgramData%\Blackmagic Design\DaVinci Resolve\Support\Developer\Scripting\README.txt
and the examples in that directory list some nice features...
but there is no documented way to list or access Multicams in the current project and they
don't show up as Timelines with
GetTimelineCount() and
GetTimelineByIndex(idx)

What I want to do it to build a clip that shows a video wall of an edited timeline, 2 generators (SMPTE colors and 10mV brightness ramp) and all the camera angles of the multicam that is used in that timeline.
It serves as a reference what alternative cameras angles are available when reviewing an edit remotely.
Up to now we have build these manually and it's a lot of work.


Introspection doesn't seem to be a way to find everything missing in the script readme.
Code: Select all
Py3> from pprint import pprint
Py3> pprint(project)
<PyRemoteObject object at 0x000002956A171E40>


Also: How do you access properties of a TimelineItem (such as transform->zoom and position)?
Offline

MarcusWolschon

  • Posts: 771
  • Joined: Sun Apr 14, 2013 6:59 pm

Re: Resolve Scripting - how to access multicams?

PostThu Nov 29, 2018 7:40 pm

I found this
https://www.steakunderwater.com/wesuckl ... 18f92f5126

and it seems you can do some introspection

Code: Select all
Py3> pprint(resolve.GetHelp('Project'))
('Project Members:\n'
 '  Project:AddRenderJob()\n'
 '  Project:DeleteAllRenderJobs()\n'
 '  Project:DeleteRenderJobByIndex()\n'
 '  Project:GetCurrentRenderFormatAndCodec()\n'
 '  Project:GetCurrentTimeline()\n'
 '  Project:GetMediaPool()\n'
 '  Project:GetName()\n'
 '  Project:GetPresets()\n'
 '  Project:GetRenderCodecs()\n'
 '  Project:GetRenderFormats()\n'
 '  Project:GetRenderJobStatus()\n'
 '  Project:GetRenderJobs()\n'
 '  Project:GetRenderPresets()\n'
 '  Project:GetSetting()\n'
 '  Project:GetTimelineByIndex()\n'
 '  Project:GetTimelineCount()\n'
 '  Project:IsRenderingInProgress()\n'
 '  Project:LoadRenderPreset()\n'
 '  Project:SaveAsNewRenderPreset()\n'
 '  Project:SetCurrentRenderFormatAndCodec()\n'
 '  Project:SetCurrentTimeline()\n'
 '  Project:SetName()\n'
 '  Project:SetPreset()\n'
 '  Project:SetRenderSettings()\n'
 '  Project:SetSetting()\n'
 '  Project:StartRendering()\n'
 '  Project:StopRendering()\n'
 '  ResolveScriptable:Print()\n'
 '  :GetApp()\n'
 '  :GetAttrs()\n'
 '  :GetHelp()\n'
 '  :GetHelpRaw()\n'
 '  :SetAttrs()\n')

Py3> pprint(resolve.GetHelp('Timeline item'))
('Timeline item Members:\n'
 '  Timeline item:AddFusionComp()\n'
 '  Timeline item:AddMarker()\n'
 '  Timeline item:ExportFusionComp()\n'
 '  Timeline item:GetClipColor()\n'
 '  Timeline item:GetDuration()\n'
 '  Timeline item:GetEnd()\n'
 '  Timeline item:GetFlags()\n'
 '  Timeline item:GetFusionCompByIndex()\n'
 '  Timeline item:GetFusionCompByName()\n'
 '  Timeline item:GetFusionCompCount()\n'
 '  Timeline item:GetFusionCompNames()\n'
 '  Timeline item:GetLeftOffset()\n'
 '  Timeline item:GetMarkers()\n'
 '  Timeline item:GetMediaPoolItem()\n'
 '  Timeline item:GetName()\n'
 '  Timeline item:GetRightOffset()\n'
 '  Timeline item:GetStart()\n'
 '  Timeline item:ImportFusionComp()\n'
 '  ResolveScriptable:Print()\n'
 '  :GetApp()\n'
 '  :GetAttrs()\n'
 '  :GetHelp()\n'
 '  :GetHelpRaw()\n'
 '  :SetAttrs()\n')



However no functionality regarding the 2 topics mentioned above seem to be in there. :(
So it's back to manual work.
Offline

MarcusWolschon

  • Posts: 771
  • Joined: Sun Apr 14, 2013 6:59 pm

Re: Resolve Scripting - how to access multicams?

PostFri Jan 10, 2020 1:48 pm

There also doesn't seem to be any way to create additional tracks for a timeline or to add clips to something else then track #0 .
Offline
User avatar

Igor Riđanović

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

Re: Resolve Scripting - how to access multicams?

PostFri Jan 10, 2020 6:19 pm

That is correct.
www.metafide.com - DaVinci Resolve™ Apps
Offline

PatHightree

  • Posts: 5
  • Joined: Sun Jul 18, 2021 10:45 am
  • Real Name: Patrick Hogenboom

Re: Resolve Scripting - how to access multicams?

PostTue Jul 27, 2021 8:39 pm

Regarding scripting position and zoom of timelineItems.
As a programmer coming to DVR, this is highly disapointing.
I was expecting to automate tedious work with python.
Is there any way to automate positioning lots of clips on lots of tracks ? Maybe via fusion ?
Offline
User avatar

Igor Riđanović

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

Re: Resolve Scripting - how to access multicams?

PostFri Jul 30, 2021 2:39 am

Fusion's API is much deeper. You can do scaling and translation.
www.metafide.com - DaVinci Resolve™ Apps
Offline

PatHightree

  • Posts: 5
  • Joined: Sun Jul 18, 2021 10:45 am
  • Real Name: Patrick Hogenboom

Re: Resolve Scripting - how to access multicams?

PostFri Jul 30, 2021 7:28 am

Cool, that's great news.
For a newbie, Fusion looks like a 1-track kind of thing.
Can I apply slightly different positions to 40+ tracks ?
Which nodes would help me in doing that ?
Offline

MarcusWolschon

  • Posts: 771
  • Joined: Sun Apr 14, 2013 6:59 pm

Re: Resolve Scripting - how to access multicams?

PostFri Jul 30, 2021 7:32 am

[quote="PatHightree"]
For a newbie, Fusion looks like a 1-track kind of thing.
Can I apply slightly different positions to 40+ tracks ?

Same issue here.
We need to automatically create video walls showing 12 tracks
as picture in picture.

I reported this in 2018 and not a single thing has changed in Resolve Scripting in 4 years!!!
It even still has the same syntax errors in the Readme file concerning usage on Windows.
Offline
User avatar

Igor Riđanović

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

Re: Resolve Scripting - how to access multicams?

PostFri Jul 30, 2021 9:09 pm

Fusion doesn't have a concept of tracks. It's a compositor. You can place as many layers on top of one another as you wish.
www.metafide.com - DaVinci Resolve™ Apps

Return to DaVinci Resolve

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 49 guests