mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
removed open djv load plugin
This commit is contained in:
parent
e7021fa424
commit
c32a43f012
1 changed files with 0 additions and 64 deletions
|
|
@ -1,64 +0,0 @@
|
|||
import os
|
||||
from ayon_core.lib import ApplicationManager
|
||||
from ayon_core.pipeline import load
|
||||
|
||||
|
||||
def existing_djv_path():
|
||||
app_manager = ApplicationManager()
|
||||
djv_list = []
|
||||
|
||||
for app_name, app in app_manager.applications.items():
|
||||
if 'djv' in app_name and app.find_executable():
|
||||
djv_list.append(app_name)
|
||||
|
||||
return djv_list
|
||||
|
||||
|
||||
class OpenInDJV(load.LoaderPlugin):
|
||||
"""Open Image Sequence with system default"""
|
||||
|
||||
djv_list = existing_djv_path()
|
||||
product_types = {"*"} if djv_list else []
|
||||
representations = ["*"]
|
||||
extensions = {
|
||||
"cin", "dpx", "avi", "dv", "gif", "flv", "mkv", "mov", "mpg", "mpeg",
|
||||
"mp4", "m4v", "mxf", "iff", "z", "ifl", "jpeg", "jpg", "jfif", "lut",
|
||||
"1dl", "exr", "pic", "png", "ppm", "pnm", "pgm", "pbm", "rla", "rpf",
|
||||
"sgi", "rgba", "rgb", "bw", "tga", "tiff", "tif", "img", "h264",
|
||||
}
|
||||
|
||||
label = "Open in DJV"
|
||||
order = -10
|
||||
icon = "play-circle"
|
||||
color = "orange"
|
||||
|
||||
def load(self, context, name, namespace, data):
|
||||
import clique
|
||||
|
||||
path = self.filepath_from_context(context)
|
||||
directory = os.path.dirname(path)
|
||||
|
||||
pattern = clique.PATTERNS["frames"]
|
||||
files = os.listdir(directory)
|
||||
collections, remainder = clique.assemble(
|
||||
files,
|
||||
patterns=[pattern],
|
||||
minimum_items=1
|
||||
)
|
||||
|
||||
if not remainder:
|
||||
sequence = collections[0]
|
||||
first_image = list(sequence)[0]
|
||||
else:
|
||||
first_image = path
|
||||
filepath = os.path.normpath(os.path.join(directory, first_image))
|
||||
|
||||
self.log.info("Opening : {}".format(filepath))
|
||||
|
||||
last_djv_version = sorted(self.djv_list)[-1]
|
||||
|
||||
app_manager = ApplicationManager()
|
||||
djv = app_manager.applications.get(last_djv_version)
|
||||
djv.arguments.append(filepath)
|
||||
|
||||
app_manager.launch(last_djv_version)
|
||||
Loading…
Add table
Add a link
Reference in a new issue