resolve: structure fix and testing workflow kick of

This commit is contained in:
Jakub Jezek 2021-01-28 13:01:35 +01:00
parent b5f2f5e37e
commit fb86bc4c8c
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
6 changed files with 71 additions and 22 deletions

View file

@ -1,22 +0,0 @@
#!/usr/bin/env python
def main():
import pype.hosts.resolve as bmdvr
bmdvr.utils.get_resolve_module()
tracks = list()
track_type = "video"
sequence = bmdvr.get_current_sequence()
# get all tracks count filtered by track type
selected_track_count = sequence.GetTrackCount(track_type)
# loop all tracks and get items
for track_index in range(1, (int(selected_track_count) + 1)):
track_name = sequence.GetTrackName("video", track_index)
tracks.append(track_name)
if __name__ == "__main__":
main()

View file

@ -0,0 +1,71 @@
#! python3
import os
resolve = bmd.scriptapp("Resolve") # noqa
fu = resolve.Fusion()
ui = fu.UIManager
disp = bmd.UIDispatcher(fu.UIManager) # noqa
title_font = ui.Font({"PixelSize": 18})
dlg = disp.AddWindow(
{
"WindowTitle": "Get Testing folder",
"ID": "TestingWin",
"Geometry": [250, 250, 250, 100],
"Spacing": 0,
"Margin": 10
},
[
ui.VGroup(
{
"Spacing": 2
},
[
ui.Button(
{
"ID": "inputTestSourcesFolder",
"Text": "Select folder with testing medias",
"Weight": 1.25,
"ToolTip": "Chose folder with videos, sequences, single images, nested folders with medias",
"Flat": False
}
),
ui.VGap(),
ui.Button(
{
"ID": "openButton",
"Text": "Open",
"Weight": 2,
"ToolTip": "Open and run test on the folder",
"Flat": False
}
)
]
)
]
)
itm = dlg.GetItems()
def _close_window(event):
disp.ExitLoop()
def _import_button(event):
otio_import.read_from_file(itm["inputTestSourcesFolder"].Text)
_close_window(None)
def _import_file_pressed(event):
selected_path = fu.RequestFile(os.path.expanduser("~"))
itm["inputTestSourcesFolder"].Text = selected_path
dlg.On.TestingWin.Close = _close_window
dlg.On.inputTestSourcesFolder.Clicked = _import_file_pressed
dlg.On.openButton.Clicked = _import_button
dlg.Show()
disp.RunLoop()
dlg.Hide()