mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 14:22:37 +01:00
resolve: structure fix and testing workflow kick of
This commit is contained in:
parent
b5f2f5e37e
commit
fb86bc4c8c
6 changed files with 71 additions and 22 deletions
|
|
@ -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()
|
||||
71
pype/hosts/resolve/utility_scripts/tests/test_utils.py
Normal file
71
pype/hosts/resolve/utility_scripts/tests/test_utils.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue