mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
removing test scrips
This commit is contained in:
parent
908e980a40
commit
26e0cacd3a
5 changed files with 0 additions and 164 deletions
|
|
@ -1,49 +0,0 @@
|
|||
#! python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
import opentimelineio as otio
|
||||
|
||||
from openpype.pipeline import install_host
|
||||
|
||||
import openpype.hosts.resolve.api as bmdvr
|
||||
from openpype.hosts.resolve.api.testing_utils import TestGUI
|
||||
from openpype.hosts.resolve.otio import davinci_export as otio_export
|
||||
|
||||
|
||||
class ThisTestGUI(TestGUI):
|
||||
extensions = [".exr", ".jpg", ".mov", ".png", ".mp4", ".ari", ".arx"]
|
||||
|
||||
def __init__(self):
|
||||
super(ThisTestGUI, self).__init__()
|
||||
# activate resolve from openpype
|
||||
install_host(bmdvr)
|
||||
|
||||
def _open_dir_button_pressed(self, event):
|
||||
# selected_path = self.fu.RequestFile(os.path.expanduser("~"))
|
||||
selected_path = self.fu.RequestDir(os.path.expanduser("~"))
|
||||
self._widgets["inputTestSourcesFolder"].Text = selected_path
|
||||
|
||||
# main function
|
||||
def process(self, event):
|
||||
self.input_dir_path = self._widgets["inputTestSourcesFolder"].Text
|
||||
project = bmdvr.get_current_project()
|
||||
otio_timeline = otio_export.create_otio_timeline(project)
|
||||
print(f"_ otio_timeline: `{otio_timeline}`")
|
||||
edl_path = os.path.join(self.input_dir_path, "this_file_name.edl")
|
||||
print(f"_ edl_path: `{edl_path}`")
|
||||
# xml_string = otio_adapters.fcpx_xml.write_to_string(otio_timeline)
|
||||
# print(f"_ xml_string: `{xml_string}`")
|
||||
otio.adapters.write_to_file(
|
||||
otio_timeline, edl_path, adapter_name="cmx_3600")
|
||||
project = bmdvr.get_current_project()
|
||||
media_pool = project.GetMediaPool()
|
||||
timeline = media_pool.ImportTimelineFromFile(edl_path)
|
||||
# at the end close the window
|
||||
self._close_window(None)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_gui = ThisTestGUI()
|
||||
test_gui.show_gui()
|
||||
sys.exit(not bool(True))
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
#! python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
import clique
|
||||
|
||||
from openpype.pipeline import install_host
|
||||
from openpype.hosts.resolve.api.testing_utils import TestGUI
|
||||
import openpype.hosts.resolve.api as bmdvr
|
||||
from openpype.hosts.resolve.api.lib import (
|
||||
create_media_pool_item,
|
||||
create_timeline_item,
|
||||
)
|
||||
|
||||
|
||||
class ThisTestGUI(TestGUI):
|
||||
extensions = [".exr", ".jpg", ".mov", ".png", ".mp4", ".ari", ".arx"]
|
||||
|
||||
def __init__(self):
|
||||
super(ThisTestGUI, self).__init__()
|
||||
# activate resolve from openpype
|
||||
install_host(bmdvr)
|
||||
|
||||
def _open_dir_button_pressed(self, event):
|
||||
# selected_path = self.fu.RequestFile(os.path.expanduser("~"))
|
||||
selected_path = self.fu.RequestDir(os.path.expanduser("~"))
|
||||
self._widgets["inputTestSourcesFolder"].Text = selected_path
|
||||
|
||||
# main function
|
||||
def process(self, event):
|
||||
self.input_dir_path = self._widgets["inputTestSourcesFolder"].Text
|
||||
|
||||
self.dir_processing(self.input_dir_path)
|
||||
|
||||
# at the end close the window
|
||||
self._close_window(None)
|
||||
|
||||
def dir_processing(self, dir_path):
|
||||
collections, reminders = clique.assemble(os.listdir(dir_path))
|
||||
|
||||
# process reminders
|
||||
for _rem in reminders:
|
||||
_rem_path = os.path.join(dir_path, _rem)
|
||||
|
||||
# go deeper if directory
|
||||
if os.path.isdir(_rem_path):
|
||||
print(_rem_path)
|
||||
self.dir_processing(_rem_path)
|
||||
else:
|
||||
self.file_processing(_rem_path)
|
||||
|
||||
# process collections
|
||||
for _coll in collections:
|
||||
_coll_path = os.path.join(dir_path, list(_coll).pop())
|
||||
self.file_processing(_coll_path)
|
||||
|
||||
def file_processing(self, fpath):
|
||||
print(f"_ fpath: `{fpath}`")
|
||||
_base, ext = os.path.splitext(fpath)
|
||||
# skip if unwanted extension
|
||||
if ext not in self.extensions:
|
||||
return
|
||||
media_pool_item = create_media_pool_item(fpath)
|
||||
print(media_pool_item)
|
||||
|
||||
track_item = create_timeline_item(media_pool_item)
|
||||
print(track_item)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_gui = ThisTestGUI()
|
||||
test_gui.show_gui()
|
||||
sys.exit(not bool(True))
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#! python3
|
||||
from openpype.pipeline import install_host
|
||||
from openpype.hosts.resolve import api as bmdvr
|
||||
from openpype.hosts.resolve.api.lib import (
|
||||
create_media_pool_item,
|
||||
create_timeline_item,
|
||||
)
|
||||
|
||||
|
||||
def file_processing(fpath):
|
||||
media_pool_item = create_media_pool_item(fpath)
|
||||
print(media_pool_item)
|
||||
|
||||
track_item = create_timeline_item(media_pool_item)
|
||||
print(track_item)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
path = "C:/CODE/__openpype_projects/jtest03dev/shots/sq01/mainsq01sh030/publish/plate/plateMain/v006/jt3d_mainsq01sh030_plateMain_v006.0996.exr"
|
||||
|
||||
# activate resolve from openpype
|
||||
install_host(bmdvr)
|
||||
|
||||
file_processing(path)
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#! python3
|
||||
from openpype.hosts.resolve.startup import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#! python3
|
||||
from openpype.pipeline import install_host
|
||||
from openpype.hosts.resolve import api as bmdvr
|
||||
from openpype.hosts.resolve.api.lib import get_current_project
|
||||
|
||||
if __name__ == "__main__":
|
||||
install_host(bmdvr)
|
||||
project = get_current_project()
|
||||
timeline_count = project.GetTimelineCount()
|
||||
print(f"Timeline count: {timeline_count}")
|
||||
timeline = project.GetTimelineByIndex(timeline_count)
|
||||
print(f"Timeline name: {timeline.GetName()}")
|
||||
print(timeline.GetTrackCount("video"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue