use moved functions in hosts and tools

This commit is contained in:
Jakub Trllo 2022-03-14 11:36:17 +01:00
parent 6fe1b5b965
commit c5ac2290f6
127 changed files with 711 additions and 427 deletions

View file

@ -1,8 +1,8 @@
from avalon import api
from openpype.modules import ModulesManager
from openpype.pipeline import load
class AddSyncSite(api.Loader):
class AddSyncSite(load.LoaderPlugin):
"""Add sync site to representation"""
representations = ["*"]
families = ["*"]

View file

@ -1,7 +1,9 @@
from avalon import api, style
from avalon import style
from openpype.pipeline import load
class CopyFile(api.Loader):
class CopyFile(load.LoaderPlugin):
"""Copy the published file to be pasted at the desired location"""
representations = ["*"]

View file

@ -1,9 +1,9 @@
import os
from avalon import api
from openpype.pipeline import load
class CopyFilePath(api.Loader):
class CopyFilePath(load.LoaderPlugin):
"""Copy published file path to clipboard"""
representations = ["*"]
families = ["*"]

View file

@ -8,13 +8,14 @@ import ftrack_api
import qargparse
from Qt import QtWidgets, QtCore
from avalon import api, style
from avalon import style
from avalon.api import AvalonMongoDB
import avalon.pipeline
from openpype.pipeline import load
from openpype.lib import StringTemplate
from openpype.api import Anatomy
class DeleteOldVersions(api.SubsetLoader):
class DeleteOldVersions(load.SubsetLoaderPlugin):
"""Deletes specific number of old version"""
is_multiple_contexts_compatible = True
@ -89,16 +90,12 @@ class DeleteOldVersions(api.SubsetLoader):
try:
context = representation["context"]
context["root"] = anatomy.roots
path = avalon.pipeline.format_template_with_optional_keys(
context, template
)
path = str(StringTemplate.format_template(template, context))
if "frame" in context:
context["frame"] = self.sequence_splitter
sequence_path = os.path.normpath(
avalon.pipeline.format_template_with_optional_keys(
context, template
)
)
sequence_path = os.path.normpath(str(
StringTemplate.format_template(template, context)
))
except KeyError:
# Template references unavailable data

View file

@ -3,9 +3,9 @@ from collections import defaultdict
from Qt import QtWidgets, QtCore, QtGui
from avalon import api
from avalon.api import AvalonMongoDB
from openpype.pipeline import load
from openpype.api import Anatomy, config
from openpype import resources, style
@ -20,7 +20,7 @@ from openpype.lib.delivery import (
)
class Delivery(api.SubsetLoader):
class Delivery(load.SubsetLoaderPlugin):
"""Export selected versions to folder structure from Template"""
is_multiple_contexts_compatible = True

View file

@ -1,6 +1,6 @@
import os
from avalon import api
from openpype.api import ApplicationManager
from openpype.pipeline import load
def existing_djv_path():
@ -13,7 +13,8 @@ def existing_djv_path():
return djv_list
class OpenInDJV(api.Loader):
class OpenInDJV(load.LoaderPlugin):
"""Open Image Sequence with system default"""
djv_list = existing_djv_path()

View file

@ -2,7 +2,7 @@ import sys
import os
import subprocess
from avalon import api
from openpype.pipeline import load
def open(filepath):
@ -15,7 +15,7 @@ def open(filepath):
subprocess.call(('xdg-open', filepath))
class Openfile(api.Loader):
class Openfile(load.LoaderPlugin):
"""Open Image Sequence with system default"""
families = ["render2d"]

View file

@ -1,8 +1,8 @@
from avalon import api
from openpype.modules import ModulesManager
from openpype.pipeline import load
class RemoveSyncSite(api.Loader):
class RemoveSyncSite(load.LoaderPlugin):
"""Remove sync site and its files on representation"""
representations = ["*"]
families = ["*"]