Thank you everyone and Happy New Year!

The Thanks scores for 2019 are in, make sure to read all about last year's highlights -> here <- !

## Resolve Scripting Essentials

AndrewHazelden
Fusionator
Posts: 1589
Joined: Fri Apr 03, 2015 3:20 pm
Location: West Dover, Nova Scotia, Canada
Contact:

### Re: Resolve Scripting Essentials

pixelstuff wrote:
Thu Dec 13, 2018 3:31 pm
Really useful, I will play with some of those color options, I didn't think about html.
@pixelstuff I just uploaded an HTML based rendering tech demo called the PipePixelFont to the WSL UI manager thread. I posted this example so you can see how the CSS background-image tag can be used to add style tags in real-time to your ui:TextEdit UI elements.

If you look at the code in the "UI-Manager-PipePixelFont-GUI-Demo.zip" demo you might notice that the resizable background "node view" like grid texture was done using old-school HTML + CSS with a "background-image" tag:

Code: Select all

	<style>
body { background-image: url('grid.png') }
</style>


This approach unlocks some really cool things like multi-layered graphics in a GUI that a lot of people might never have expected to be possible inside of UI Manager. It also shows how UI Manager is a big step up from the previous IUP GUI building system in Fusion 7.

pixelstuff
Posts: 43
Joined: Sun Jul 15, 2018 11:50 am

### Re: Resolve Scripting Essentials

fu:ToggleUtility('SVGImport')

Thanks for providing these examples really helped. Is there a way to prevent the file open browser and directly reference a file or does this command link to a separate script? and would that script be available to see the lua code? to be able to update it in this way?

ConorBowes
Posts: 2
Joined: Mon Jan 07, 2019 3:41 pm

### Re: Resolve Scripting Essentials

Does anyone know of a way to add a job to the render queue for Deliver tab for remote rendering? I have been able to get the job added quite easily, but I cannot find a way to make it added with the remote renderer.

MrPingouin
Posts: 1
Joined: Thu Mar 21, 2019 3:46 am

### Re: Resolve Scripting Essentials

Hello World !

I'm new to DaVinci Resolve (since yesterday actually).

The Help browser helped me A LOT (I'm quite used to finding informations this way, I wrote a lot of scripts for After FX using ExtendScript toolkit object browser).

However, there's a Track information that would help me a lot in my tools, but I can't manage to reach it by script : a track's name.
1. local timeline = p:GetCurrentTimeline() -- this is ok
2. local trackCount = timeline:GetTrackCount("video") -- this is ok
3. local trackItems = timeline:GetItemsInTrack("video",5)) -- let's say we take the items in video track 5, this is ok
Does someone know a way to access track names ?

SirEdric
Fusionator
Posts: 2159
Joined: Tue Aug 05, 2014 10:04 am
Real name: Eric Westphal
Been thanked: 14 times
Contact:

### Re: Resolve Scripting Essentials

SirEdric wrote:
Wed Apr 11, 2018 10:58 pm
Now if one only could do something like fu:ToggleUtility('FBXImport', 'p:\ath\to\file.obj', autoImport = true)
Quoting myself here....
Does anybody have new information on this topic for F16?
Is there a way now to import fbx via script?

llamafilm
Posts: 8
Joined: Thu May 23, 2019 8:42 am

Is there any way to read/write data from grading nodes in Resolve's color page with a script? I haven't found anything in the documentation. Why should Fusion users get to have all the fun?

Posts: 3
Joined: Tue Jul 02, 2019 2:31 am

### Re: Resolve Scripting Essentials

Hey,

Does anyone know if altering timeline is possible via python script? Like cutting 5 seconds from beginning and ending?

kir3d
Posts: 5
Joined: Sun Oct 11, 2015 10:49 am

### Re: Resolve Scripting Essentials

Macos 10.15.1, DVR 16.1 Studio, Python 3.7.3 with DVR API.
Can create empty timeline: mediaPool.CreateEmptyTimeline(name)
But don't understand how to CreateTimelineFromClips or AppendToTimeline(name).
Can show examples of use?

Igor Ridanovic
Posts: 36
Joined: Mon Apr 16, 2018 11:17 pm
Location: Los Angeles
Been thanked: 2 times
Contact:

### Re: Resolve Scripting Essentials

Timeline append example about 7:20 in.

kir3d
Posts: 5
Joined: Sun Oct 11, 2015 10:49 am

### Re: Resolve Scripting Essentials

Thank you Igor! I also make:
mediaPool.CreateTimelineFromClips(name, mediaPool.GetCurrentFolder().GetClips()[index])

Now I don't understand how to append audio to second track and Fusion comp to second track. May be Fusion comp like Template with publishing text fields for changing. I tried make edl with structure - only one track, tried male fcpxml - ignored Fusion composition

P.S. I seen you video about dynamic text. This and other very nice and helpful tutorials!

Igor Ridanovic
Posts: 36
Joined: Mon Apr 16, 2018 11:17 pm
Location: Los Angeles
Been thanked: 2 times
Contact:

### Re: Resolve Scripting Essentials

I think you can currently only append to the bottom track. If you're thinking using the XML or AAF route you may want to look into OpenTimelineIO. https://github.com/PixarAnimationStudios/OpenTimelineIO

kir3d
Posts: 5
Joined: Sun Oct 11, 2015 10:49 am

Thank you Igor!