mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #546 from ynput/chore/AY-4908_move-maya-code
Chore: Move Maya addon code
This commit is contained in:
commit
6eaf81f20d
300 changed files with 1332 additions and 1609 deletions
|
|
@ -57,6 +57,7 @@ MOVED_ADDON_MILESTONE_VERSIONS = {
|
|||
"max": VersionInfo(0, 2, 0),
|
||||
"traypublisher": VersionInfo(0, 2, 0),
|
||||
"tvpaint": VersionInfo(0, 2, 0),
|
||||
"maya": VersionInfo(0, 2, 0),
|
||||
"nuke": VersionInfo(0, 2, 0),
|
||||
"substancepainter": VersionInfo(0, 2, 0),
|
||||
}
|
||||
|
|
@ -1330,7 +1331,7 @@ class TrayAddonsManager(AddonsManager):
|
|||
self.doubleclick_callback = None
|
||||
|
||||
def add_doubleclick_callback(self, addon, callback):
|
||||
"""Register doubleclick callbacks on tray icon.
|
||||
"""Register double-click callbacks on tray icon.
|
||||
|
||||
Currently, there is no way how to determine which is launched. Name of
|
||||
callback can be defined with `doubleclick_callback` attribute.
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ from ayon_core.lib import (
|
|||
EnumDef,
|
||||
is_in_tests,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib_rendersettings import RenderSettings
|
||||
from ayon_core.hosts.maya.api.lib import get_attr_in_layer
|
||||
from ayon_maya.api.lib_rendersettings import RenderSettings
|
||||
from ayon_maya.api.lib import get_attr_in_layer
|
||||
|
||||
from openpype_modules.deadline import abstract_submit_deadline
|
||||
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
|
||||
|
|
|
|||
|
|
@ -108,6 +108,10 @@ line-ending = "auto"
|
|||
# Ignore words that are not in the dictionary.
|
||||
ignore-words-list = "ayon,ynput,parms,parm,hda,developpement,ue"
|
||||
|
||||
# Ignore lines that contain this regex. This is hack for missing inline ignore.
|
||||
# Remove with next codespell release (>2.2.6)
|
||||
ignore-regex = ".*codespell:ignore.*"
|
||||
|
||||
skip = "./.*,./package/*,*/vendor/*,*/unreal/integration/*,*/aftereffects/api/extension/js/libs/*"
|
||||
count = true
|
||||
quiet-level = 3
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import os
|
|||
|
||||
from maya import cmds # noqa
|
||||
|
||||
from ayon_core.hosts.maya.api.lib import evaluation
|
||||
from ayon_maya.api.lib import evaluation
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ compatible implementation to support bothPython 2 and Python 3.
|
|||
|
||||
Instead of using ExitStack from contextlib, use it from this module:
|
||||
|
||||
>>> from ayon_core.hosts.maya.api.exitstack import ExitStack
|
||||
>>> from ayon_maya.api.exitstack import ExitStack
|
||||
|
||||
It will provide the appropriate ExitStack implementation for the current
|
||||
running Python version.
|
||||
|
|
@ -4,7 +4,7 @@ import logging
|
|||
|
||||
from maya import cmds # noqa
|
||||
import maya.mel as mel # noqa
|
||||
from ayon_core.hosts.maya.api.lib import maintained_selection
|
||||
from ayon_maya.api.lib import maintained_selection
|
||||
|
||||
|
||||
class FBXExtractor:
|
||||
|
|
@ -16,7 +16,7 @@ _gltf_options = {
|
|||
"hbu": bool, # hashBufferURI
|
||||
"ext": bool, # externalTextures
|
||||
"ivt": int, # initialValuesTime
|
||||
"acn": str, # animationClipName
|
||||
"acn": str, # animationClipName # codespell:ignore acn
|
||||
"ast": int, # animationClipStartTime
|
||||
"aet": int, # animationClipEndTime
|
||||
"afr": float, # animationClipFrameRate
|
||||
|
|
@ -8,7 +8,7 @@ from ayon_core.settings import get_project_settings
|
|||
|
||||
from ayon_core.pipeline import CreatorError, get_current_project_name
|
||||
from ayon_core.pipeline.context_tools import get_current_folder_entity
|
||||
from ayon_core.hosts.maya.api.lib import reset_frame_range
|
||||
from ayon_maya.api.lib import reset_frame_range
|
||||
|
||||
|
||||
class RenderSettings(object):
|
||||
|
|
@ -19,7 +19,7 @@ from maya.app.renderSetup.model.override import (
|
|||
UniqueOverride
|
||||
)
|
||||
|
||||
from ayon_core.hosts.maya.api.lib import get_attribute
|
||||
from ayon_maya.api.lib import get_attribute
|
||||
|
||||
EXACT_MATCH = 0
|
||||
PARENT_MATCH = 1
|
||||
|
|
@ -15,7 +15,7 @@ from ayon_core.pipeline import (
|
|||
)
|
||||
from ayon_core.pipeline.workfile import BuildWorkfile
|
||||
from ayon_core.tools.utils import host_tools
|
||||
from ayon_core.hosts.maya.api import lib, lib_rendersettings
|
||||
from ayon_maya.api import lib, lib_rendersettings
|
||||
from .lib import get_main_window, IS_HEADLESS
|
||||
from ..tools import show_look_assigner
|
||||
|
||||
|
|
@ -45,8 +45,8 @@ from ayon_core.pipeline.workfile.lock_workfile import (
|
|||
is_workfile_locked,
|
||||
is_workfile_lock_enabled
|
||||
)
|
||||
from ayon_core.hosts.maya import MAYA_ROOT_DIR
|
||||
from ayon_core.hosts.maya.lib import create_workspace_mel
|
||||
from ayon_maya import MAYA_ROOT_DIR
|
||||
from ayon_maya.lib import create_workspace_mel
|
||||
|
||||
from . import menu, lib
|
||||
from .workio import (
|
||||
|
|
@ -58,7 +58,7 @@ from .workio import (
|
|||
current_file
|
||||
)
|
||||
|
||||
log = logging.getLogger("ayon_core.hosts.maya")
|
||||
log = logging.getLogger("ayon_maya")
|
||||
|
||||
PLUGINS_DIR = os.path.join(MAYA_ROOT_DIR, "plugins")
|
||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
|
||||
|
|
@ -2,40 +2,41 @@ import json
|
|||
import os
|
||||
from abc import ABCMeta
|
||||
|
||||
import ayon_api
|
||||
import qargparse
|
||||
import six
|
||||
import ayon_api
|
||||
from maya import cmds
|
||||
from maya.app.renderSetup.model import renderSetup
|
||||
|
||||
from ayon_core.lib import BoolDef, Logger
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
AYON_INSTANCE_ID,
|
||||
AYON_CONTAINER_ID,
|
||||
AVALON_INSTANCE_ID,
|
||||
AVALON_CONTAINER_ID,
|
||||
AVALON_INSTANCE_ID,
|
||||
AYON_CONTAINER_ID,
|
||||
AYON_INSTANCE_ID,
|
||||
Anatomy,
|
||||
|
||||
AutoCreator,
|
||||
CreatedInstance,
|
||||
Creator as NewCreator,
|
||||
AutoCreator,
|
||||
HiddenCreator,
|
||||
|
||||
CreatorError,
|
||||
HiddenCreator,
|
||||
LegacyCreator,
|
||||
LoaderPlugin,
|
||||
get_representation_path,
|
||||
get_current_project_name,
|
||||
get_representation_path,
|
||||
publish,
|
||||
)
|
||||
from ayon_core.pipeline.load import LoadError
|
||||
from ayon_core.pipeline.create import get_product_name
|
||||
from ayon_core.pipeline.load import LoadError
|
||||
from ayon_core.settings import get_project_settings
|
||||
from maya import cmds
|
||||
from maya.app.renderSetup.model import renderSetup
|
||||
from pyblish.api import ContextPlugin, InstancePlugin
|
||||
|
||||
from . import lib
|
||||
from .lib import imprint, read
|
||||
from .pipeline import containerise
|
||||
|
||||
log = Logger.get_logger()
|
||||
SETTINGS_CATEGORY = "maya"
|
||||
|
||||
|
||||
def _get_attr(node, attr, default=None):
|
||||
|
|
@ -652,7 +653,7 @@ def get_load_color_for_product_type(product_type, settings=None):
|
|||
|
||||
class Loader(LoaderPlugin):
|
||||
hosts = ["maya"]
|
||||
|
||||
settings_category = SETTINGS_CATEGORY
|
||||
load_settings = {} # defined in settings
|
||||
|
||||
@classmethod
|
||||
|
|
@ -807,10 +808,9 @@ class ReferenceLoader(Loader):
|
|||
raise NotImplementedError("Must be implemented by subclass")
|
||||
|
||||
def update(self, container, context):
|
||||
from ayon_maya.api.lib import get_container_members
|
||||
from maya import cmds
|
||||
|
||||
from ayon_core.hosts.maya.api.lib import get_container_members
|
||||
|
||||
node = container["objectName"]
|
||||
|
||||
project_name = context["project"]["name"]
|
||||
|
|
@ -1025,3 +1025,30 @@ class ReferenceLoader(Loader):
|
|||
AYON_CONTAINER_ID, AVALON_CONTAINER_ID
|
||||
}:
|
||||
cmds.sets(node, forceElement=container)
|
||||
|
||||
|
||||
class MayaLoader(LoaderPlugin):
|
||||
"""Base class for loader plugins."""
|
||||
|
||||
settings_category = SETTINGS_CATEGORY
|
||||
|
||||
|
||||
class MayaInstancePlugin(InstancePlugin):
|
||||
"""Base class for instance publish plugins."""
|
||||
|
||||
settings_category = SETTINGS_CATEGORY
|
||||
hosts = ["maya"]
|
||||
|
||||
|
||||
class MayaContextPlugin(ContextPlugin):
|
||||
"""Base class for context publish plugins."""
|
||||
|
||||
settings_category = SETTINGS_CATEGORY
|
||||
hosts = ["maya"]
|
||||
|
||||
|
||||
class MayaExtractorPlugin(publish.Extractor):
|
||||
"""Base class for extract plugins."""
|
||||
|
||||
settings_category = SETTINGS_CATEGORY
|
||||
hosts = ["maya"]
|
||||
|
|
@ -20,7 +20,7 @@ from ayon_core.pipeline import (
|
|||
get_representation_path,
|
||||
get_current_project_name,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
from ayon_maya.api.lib import (
|
||||
matrix_equals,
|
||||
unique_namespace,
|
||||
get_container_transforms,
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from ayon_applications import PreLaunchHook, LaunchTypes
|
||||
from ayon_core.hosts.maya.lib import create_workspace_mel
|
||||
from ayon_maya.lib import create_workspace_mel
|
||||
|
||||
|
||||
class PreCopyMel(PreLaunchHook):
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import ayon_api
|
||||
|
||||
from ayon_core.pipeline.create.creator_plugins import ProductConvertorPlugin
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_core.hosts.maya.api.lib import read
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.lib import read
|
||||
|
||||
from maya import cmds
|
||||
from maya.app.renderSetup.model import renderSetup
|
||||
|
|
@ -12,7 +12,7 @@ class MayaLegacyConvertor(ProductConvertorPlugin,
|
|||
plugin.MayaCreatorBase):
|
||||
"""Find and convert any legacy products in the scene.
|
||||
|
||||
This Convertor will find all legacy products in the scene and will
|
||||
This Converter will find all legacy products in the scene and will
|
||||
transform them to the current system. Since the old products doesn't
|
||||
retain any information about their original creators, the only mapping
|
||||
we can do is based on their families.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.hosts.maya.api import lib, plugin
|
||||
from ayon_maya.api import lib, plugin
|
||||
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class CreateAssembly(plugin.MayaCreator):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_core.lib import BoolDef
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
plugin,
|
||||
lib
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
EnumDef,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class CreateMayaScene(plugin.MayaCreator):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
TextDef
|
||||
|
|
@ -8,7 +8,7 @@ from ayon_api import (
|
|||
)
|
||||
from maya import cmds # noqa: F401
|
||||
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_core.lib import BoolDef, EnumDef, TextDef
|
||||
from ayon_core.pipeline import (
|
||||
Creator,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
EnumDef
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
NumberDef,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
NumberDef,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
NumberDef,
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator of Redshift proxy product types."""
|
||||
|
||||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from ayon_core.lib import BoolDef
|
||||
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Create ``Render`` instance in Maya."""
|
||||
|
||||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib_rendersettings,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_core.pipeline import CreatorError
|
||||
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ import json
|
|||
from maya import cmds
|
||||
import ayon_api
|
||||
|
||||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class CreateRig(plugin.MayaCreator):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_core.lib import BoolDef
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator for Unreal Skeletal Meshes."""
|
||||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from ayon_core.lib import (
|
||||
BoolDef,
|
||||
TextDef
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Creator for Unreal Static Meshes."""
|
||||
from ayon_core.hosts.maya.api import plugin, lib
|
||||
from ayon_maya.api import plugin, lib
|
||||
from maya import cmds # noqa
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
plugin,
|
||||
lib
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Create instance of vrayscene."""
|
||||
|
||||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib_rendersettings,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
import ayon_api
|
||||
|
||||
from ayon_core.pipeline import CreatedInstance, AutoCreator
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class CreateXgen(plugin.MayaCreator):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.hosts.maya.api import (
|
||||
from ayon_maya.api import (
|
||||
lib,
|
||||
plugin
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.pipeline import InventoryAction, get_repres_contexts
|
||||
from ayon_core.hosts.maya.api.lib import get_id
|
||||
from ayon_maya.api.lib import get_id
|
||||
|
||||
|
||||
class ConnectGeometry(InventoryAction):
|
||||
|
|
@ -9,7 +9,7 @@ from ayon_core.pipeline import (
|
|||
get_repres_contexts,
|
||||
get_representation_path,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import get_container_members, get_id
|
||||
from ayon_maya.api.lib import get_container_members, get_id
|
||||
|
||||
|
||||
class ConnectYetiRig(InventoryAction):
|
||||
|
|
@ -8,7 +8,7 @@ from ayon_core.pipeline import (
|
|||
InventoryAction,
|
||||
get_current_project_name,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
from ayon_maya.api.lib import (
|
||||
maintained_selection,
|
||||
apply_shaders
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.pipeline import InventoryAction
|
||||
from ayon_core.hosts.maya.api.lib import get_reference_node
|
||||
from ayon_maya.api.lib import get_reference_node
|
||||
|
||||
|
||||
class ImportReference(InventoryAction):
|
||||
|
|
@ -3,7 +3,7 @@ from ayon_core.pipeline import (
|
|||
get_current_project_name,
|
||||
)
|
||||
from ayon_core.pipeline.load import get_representation_contexts_by_ids
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
from ayon_maya.api.lib import (
|
||||
create_rig_animation_instance,
|
||||
get_container_members,
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from maya import cmds
|
||||
|
||||
from ayon_core.pipeline import InventoryAction, registered_host
|
||||
from ayon_core.hosts.maya.api.lib import get_container_members
|
||||
from ayon_maya.api.lib import get_container_members
|
||||
|
||||
|
||||
class SelectInScene(InventoryAction):
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import ayon_core.hosts.maya.api.plugin
|
||||
import ayon_maya.api.plugin
|
||||
import maya.cmds as cmds
|
||||
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ def _process_reference(file_url, name, namespace, options):
|
|||
Returns:
|
||||
list: list of object nodes
|
||||
"""
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
from ayon_maya.api.lib import unique_namespace
|
||||
# Get name from asset being loaded
|
||||
# Assuming name is product name from the animation, we split the number
|
||||
# suffix from the name to ensure the namespace is unique
|
||||
|
|
@ -43,7 +43,7 @@ def _process_reference(file_url, name, namespace, options):
|
|||
return nodes
|
||||
|
||||
|
||||
class AbcLoader(ayon_core.hosts.maya.api.plugin.ReferenceLoader):
|
||||
class AbcLoader(ayon_maya.api.plugin.ReferenceLoader):
|
||||
"""Loader to reference an Alembic file"""
|
||||
|
||||
product_types = {
|
||||
|
|
@ -74,7 +74,7 @@ class AbcLoader(ayon_core.hosts.maya.api.plugin.ReferenceLoader):
|
|||
return nodes
|
||||
|
||||
|
||||
class FbxLoader(ayon_core.hosts.maya.api.plugin.ReferenceLoader):
|
||||
class FbxLoader(ayon_maya.api.plugin.ReferenceLoader):
|
||||
"""Loader to reference an Fbx files"""
|
||||
|
||||
product_types = {
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
"""
|
||||
import qargparse
|
||||
from ayon_core.pipeline import load
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
from ayon_maya.api.lib import (
|
||||
maintained_selection,
|
||||
get_custom_namespace
|
||||
)
|
||||
import ayon_core.hosts.maya.api.plugin
|
||||
import ayon_maya.api.plugin
|
||||
|
||||
|
||||
class SetFrameRangeLoader(load.LoaderPlugin):
|
||||
|
|
@ -85,7 +85,7 @@ class SetFrameRangeWithHandlesLoader(load.LoaderPlugin):
|
|||
animationEndTime=end)
|
||||
|
||||
|
||||
class ImportMayaLoader(ayon_core.hosts.maya.api.plugin.Loader):
|
||||
class ImportMayaLoader(ayon_maya.api.plugin.Loader):
|
||||
"""Import action for Maya (unmanaged)
|
||||
|
||||
Warning:
|
||||
|
|
@ -1,21 +1,18 @@
|
|||
import os
|
||||
|
||||
import clique
|
||||
|
||||
import maya.cmds as cmds
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
unique_namespace,
|
||||
from ayon_maya.api.lib import (
|
||||
get_attribute_input,
|
||||
get_fps_for_current_context,
|
||||
maintained_selection,
|
||||
get_fps_for_current_context
|
||||
unique_namespace,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
def is_sequence(files):
|
||||
|
|
@ -26,7 +23,7 @@ def is_sequence(files):
|
|||
return sequence
|
||||
|
||||
|
||||
class ArnoldStandinLoader(load.LoaderPlugin):
|
||||
class ArnoldStandinLoader(plugin.Loader):
|
||||
"""Load as Arnold standin"""
|
||||
|
||||
product_types = {
|
||||
|
|
@ -1,16 +1,10 @@
|
|||
from ayon_core.lib import (
|
||||
BoolDef
|
||||
)
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
registered_host
|
||||
)
|
||||
from ayon_core.hosts.maya.api.workfile_template_builder import (
|
||||
MayaTemplateBuilder
|
||||
)
|
||||
from ayon_core.lib import BoolDef
|
||||
from ayon_core.pipeline import registered_host
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.workfile_template_builder import MayaTemplateBuilder
|
||||
|
||||
|
||||
class LoadAsTemplate(load.LoaderPlugin):
|
||||
class LoadAsTemplate(plugin.Loader):
|
||||
"""Load workfile as a template """
|
||||
|
||||
product_types = {"workfile", "mayaScene"}
|
||||
|
|
@ -1,16 +1,12 @@
|
|||
import maya.cmds as cmds
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
remove_container
|
||||
)
|
||||
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
from ayon_core.hosts.maya.api import setdress
|
||||
from ayon_core.pipeline import remove_container
|
||||
from ayon_maya.api import setdress
|
||||
from ayon_maya.api.lib import unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class AssemblyLoader(load.LoaderPlugin):
|
||||
class AssemblyLoader(plugin.Loader):
|
||||
|
||||
product_types = {"assembly"}
|
||||
representations = {"json"}
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_maya.api.lib import get_container_members, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds, mel
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace, get_container_members
|
||||
|
||||
|
||||
class AudioLoader(load.LoaderPlugin):
|
||||
class AudioLoader(plugin.Loader):
|
||||
"""Specific loader of audio."""
|
||||
|
||||
product_types = {"audio"}
|
||||
|
|
@ -1,16 +1,13 @@
|
|||
import maya.cmds as cmds
|
||||
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api.lib import unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
|
||||
class GpuCacheLoader(load.LoaderPlugin):
|
||||
class GpuCacheLoader(plugin.Loader):
|
||||
"""Load Alembic as gpuCache"""
|
||||
|
||||
product_types = {"model", "animation", "proxyAbc", "pointcache"}
|
||||
|
|
@ -1,24 +1,17 @@
|
|||
import copy
|
||||
|
||||
from ayon_core.lib import EnumDef
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_current_host_name,
|
||||
from ayon_core.pipeline import get_current_host_name
|
||||
from ayon_core.pipeline.colorspace import (
|
||||
get_current_context_imageio_config_preset,
|
||||
get_imageio_file_rules,
|
||||
get_imageio_file_rules_colorspace_from_filepath,
|
||||
)
|
||||
from ayon_core.pipeline.load.utils import get_representation_path_from_context
|
||||
from ayon_core.pipeline.colorspace import (
|
||||
get_imageio_file_rules_colorspace_from_filepath,
|
||||
get_current_context_imageio_config_preset,
|
||||
get_imageio_file_rules
|
||||
)
|
||||
from ayon_core.settings import get_project_settings
|
||||
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
unique_namespace,
|
||||
namespaced
|
||||
)
|
||||
|
||||
from ayon_maya.api.lib import namespaced, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds
|
||||
|
||||
|
||||
|
|
@ -88,7 +81,7 @@ def create_stencil():
|
|||
return file, place, stencil, place_stencil
|
||||
|
||||
|
||||
class FileNodeLoader(load.LoaderPlugin):
|
||||
class FileNodeLoader(plugin.Loader):
|
||||
"""File node loader."""
|
||||
|
||||
product_types = {"image", "plate", "render"}
|
||||
|
|
@ -1,18 +1,14 @@
|
|||
from qtpy import QtWidgets, QtCore
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
unique_namespace,
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_maya.api.lib import (
|
||||
get_container_members,
|
||||
namespaced,
|
||||
pairwise,
|
||||
get_container_members
|
||||
unique_namespace,
|
||||
)
|
||||
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds
|
||||
from qtpy import QtCore, QtWidgets
|
||||
|
||||
|
||||
def disconnect_inputs(plug):
|
||||
|
|
@ -84,7 +80,7 @@ class CameraWindow(QtWidgets.QDialog):
|
|||
self.close()
|
||||
|
||||
|
||||
class ImagePlaneLoader(load.LoaderPlugin):
|
||||
class ImagePlaneLoader(plugin.Loader):
|
||||
"""Specific loader of plate for image planes on selected camera."""
|
||||
|
||||
product_types = {"image", "plate", "render"}
|
||||
|
|
@ -3,18 +3,16 @@
|
|||
import json
|
||||
from collections import defaultdict
|
||||
|
||||
from qtpy import QtWidgets
|
||||
import ayon_maya.api.plugin
|
||||
from ayon_api import get_representation_by_name
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
import ayon_core.hosts.maya.api.plugin
|
||||
from ayon_core.hosts.maya.api import lib
|
||||
from ayon_core.hosts.maya.api.lib import get_reference_node
|
||||
|
||||
from ayon_core.tools.utils import ScrollMessageBox
|
||||
from ayon_maya.api import lib
|
||||
from ayon_maya.api.lib import get_reference_node
|
||||
from qtpy import QtWidgets
|
||||
|
||||
|
||||
class LookLoader(ayon_core.hosts.maya.api.plugin.ReferenceLoader):
|
||||
class LookLoader(ayon_maya.api.plugin.ReferenceLoader):
|
||||
"""Specific loader for lookdev"""
|
||||
|
||||
product_types = {"look"}
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
from ayon_maya.api import plugin
|
||||
from maya import mel
|
||||
from ayon_core.pipeline import load
|
||||
|
||||
class MatchmoveLoader(load.LoaderPlugin):
|
||||
|
||||
class MatchmoveLoader(plugin.Loader):
|
||||
"""
|
||||
This will run matchmove script to create track in scene.
|
||||
|
||||
|
|
@ -1,19 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import maya.cmds as cmds
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path,
|
||||
)
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.pipeline.load import get_representation_path_from_context
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
namespaced,
|
||||
unique_namespace
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_maya.api.lib import namespaced, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class MayaUsdLoader(load.LoaderPlugin):
|
||||
class MayaUsdLoader(plugin.Loader):
|
||||
"""Read USD data in a Maya USD Proxy"""
|
||||
|
||||
product_types = {"model", "usd", "pointcache", "animation"}
|
||||
|
|
@ -1,23 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import maya.cmds as cmds
|
||||
from maya import mel
|
||||
import os
|
||||
|
||||
import maya.cmds as cmds
|
||||
from ayon_api import get_representation_by_id
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
maintained_selection,
|
||||
namespaced,
|
||||
unique_namespace
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.lib import maintained_selection, namespaced, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from maya import mel
|
||||
|
||||
|
||||
class MultiverseUsdLoader(load.LoaderPlugin):
|
||||
class MultiverseUsdLoader(plugin.Loader):
|
||||
"""Read USD data in a Multiverse Compound"""
|
||||
|
||||
product_types = {
|
||||
|
|
@ -1,22 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import maya.cmds as cmds
|
||||
from maya import mel
|
||||
import os
|
||||
|
||||
import maya.cmds as cmds
|
||||
import qargparse
|
||||
from ayon_api import get_representation_by_id
|
||||
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
maintained_selection
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.lib import maintained_selection
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from maya import mel
|
||||
|
||||
|
||||
class MultiverseUsdOverLoader(load.LoaderPlugin):
|
||||
class MultiverseUsdOverLoader(plugin.Loader):
|
||||
"""Reference file"""
|
||||
|
||||
product_types = {"mvUsdOverride"}
|
||||
|
|
@ -1,25 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Loader for Redshift proxy."""
|
||||
import os
|
||||
|
||||
import clique
|
||||
|
||||
import maya.cmds as cmds
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
namespaced,
|
||||
maintained_selection,
|
||||
unique_namespace
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.lib import maintained_selection, namespaced, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
|
||||
class RedshiftProxyLoader(load.LoaderPlugin):
|
||||
class RedshiftProxyLoader(plugin.Loader):
|
||||
"""Load Redshift proxy"""
|
||||
|
||||
product_types = {"redshiftproxy"}
|
||||
|
|
@ -1,17 +1,16 @@
|
|||
import difflib
|
||||
import contextlib
|
||||
import difflib
|
||||
|
||||
from maya import cmds
|
||||
import qargparse
|
||||
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
maintained_selection,
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.lib import (
|
||||
create_rig_animation_instance,
|
||||
get_container_members,
|
||||
maintained_selection,
|
||||
parent_nodes,
|
||||
create_rig_animation_instance
|
||||
)
|
||||
from maya import cmds
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
@ -6,21 +6,18 @@ When this json is loaded, it will overwrite all settings on RenderSetup
|
|||
instance.
|
||||
"""
|
||||
|
||||
import contextlib
|
||||
import json
|
||||
import sys
|
||||
import six
|
||||
import contextlib
|
||||
|
||||
from ayon_core.lib import BoolDef, EnumDef
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api import lib
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
|
||||
from maya import cmds
|
||||
import maya.app.renderSetup.model.renderSetup as renderSetup
|
||||
import six
|
||||
from ayon_core.lib import BoolDef, EnumDef
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_maya.api import lib
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from maya import cmds
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
|
@ -48,7 +45,7 @@ def mark_all_imported(enabled):
|
|||
cmds.deleteAttr(plug)
|
||||
|
||||
|
||||
class RenderSetupLoader(load.LoaderPlugin):
|
||||
class RenderSetupLoader(plugin.Loader):
|
||||
"""Load json preset for RenderSetup overwriting current one."""
|
||||
|
||||
product_types = {"rendersetup"}
|
||||
|
|
@ -1,15 +1,18 @@
|
|||
"""Load OpenVDB for Arnold in aiVolume.
|
||||
|
||||
TODO:
|
||||
`aiVolume` doesn't automatically set velocity fps correctly, set manual?
|
||||
|
||||
"""
|
||||
import os
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
# TODO aiVolume doesn't automatically set velocity fps correctly, set manual?
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
|
||||
class LoadVDBtoArnold(load.LoaderPlugin):
|
||||
class LoadVDBtoArnold(plugin.Loader):
|
||||
"""Load OpenVDB for Arnold in aiVolume"""
|
||||
|
||||
product_types = {"vdbcache"}
|
||||
|
|
@ -21,9 +24,9 @@ class LoadVDBtoArnold(load.LoaderPlugin):
|
|||
|
||||
def load(self, context, name, namespace, data):
|
||||
|
||||
from ayon_maya.api.lib import unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from maya import cmds
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
import os
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
|
||||
class LoadVDBtoRedShift(load.LoaderPlugin):
|
||||
class LoadVDBtoRedShift(plugin.Loader):
|
||||
"""Load OpenVDB in a Redshift Volume Shape
|
||||
|
||||
Note that the RedshiftVolumeShape is created without a RedshiftVolume
|
||||
|
|
@ -27,9 +25,9 @@ class LoadVDBtoRedShift(load.LoaderPlugin):
|
|||
|
||||
def load(self, context, name=None, namespace=None, data=None):
|
||||
|
||||
from ayon_maya.api.lib import unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from maya import cmds
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
import os
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
from maya import cmds
|
||||
|
||||
# List of 3rd Party Channels Mapping names for VRayVolumeGrid
|
||||
|
|
@ -74,7 +71,7 @@ def _fix_duplicate_vvg_callbacks():
|
|||
matched.add(callback)
|
||||
|
||||
|
||||
class LoadVDBtoVRay(load.LoaderPlugin):
|
||||
class LoadVDBtoVRay(plugin.Loader):
|
||||
"""Load OpenVDB in a V-Ray Volume Grid"""
|
||||
|
||||
product_types = {"vdbcache"}
|
||||
|
|
@ -86,8 +83,8 @@ class LoadVDBtoVRay(load.LoaderPlugin):
|
|||
|
||||
def load(self, context, name, namespace, data):
|
||||
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_maya.api.lib import unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
|
||||
path = self.filepath_from_context(context)
|
||||
assert os.path.exists(path), (
|
||||
|
|
@ -159,7 +156,7 @@ class LoadVDBtoVRay(load.LoaderPlugin):
|
|||
|
||||
def _set_path(self, grid_node, path, show_preset_popup=True):
|
||||
|
||||
from ayon_core.hosts.maya.api.lib import attribute_values
|
||||
from ayon_maya.api.lib import attribute_values
|
||||
from maya import cmds
|
||||
|
||||
def _get_filename_from_folder(path):
|
||||
|
|
@ -175,6 +172,7 @@ class LoadVDBtoVRay(load.LoaderPlugin):
|
|||
else:
|
||||
# Sequence
|
||||
import clique
|
||||
|
||||
# todo: check support for negative frames as input
|
||||
collections, remainder = clique.assemble(files)
|
||||
assert len(collections) == 1, (
|
||||
|
|
@ -7,24 +7,17 @@ loader will use them instead of native vray vrmesh format.
|
|||
"""
|
||||
import os
|
||||
|
||||
import maya.cmds as cmds
|
||||
|
||||
import ayon_api
|
||||
import maya.cmds as cmds
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path,
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
maintained_selection,
|
||||
namespaced,
|
||||
unique_namespace
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api.lib import maintained_selection, namespaced, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
|
||||
class VRayProxyLoader(load.LoaderPlugin):
|
||||
class VRayProxyLoader(plugin.Loader):
|
||||
"""Load VRay Proxy with Alembic or VrayMesh."""
|
||||
|
||||
product_types = {"vrayproxy", "model", "pointcache", "animation"}
|
||||
|
|
@ -1,20 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import maya.cmds as cmds # noqa
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
maintained_selection,
|
||||
namespaced,
|
||||
unique_namespace
|
||||
)
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api.lib import maintained_selection, namespaced, unique_namespace
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
|
||||
class VRaySceneLoader(load.LoaderPlugin):
|
||||
class VRaySceneLoader(plugin.Loader):
|
||||
"""Load Vray scene"""
|
||||
|
||||
product_types = {"vrayscene_layer"}
|
||||
|
|
@ -1,23 +1,21 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
from ayon_maya.api import plugin
|
||||
import maya.cmds as cmds
|
||||
import xgenm
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_maya.api import current_file
|
||||
from ayon_maya.api.lib import (
|
||||
attribute_values,
|
||||
get_container_members,
|
||||
maintained_selection,
|
||||
write_xgen_file,
|
||||
)
|
||||
from qtpy import QtWidgets
|
||||
|
||||
import ayon_core.hosts.maya.api.plugin
|
||||
from ayon_core.hosts.maya.api.lib import (
|
||||
maintained_selection,
|
||||
get_container_members,
|
||||
attribute_values,
|
||||
write_xgen_file
|
||||
)
|
||||
from ayon_core.hosts.maya.api import current_file
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
|
||||
|
||||
class XgenLoader(ayon_core.hosts.maya.api.plugin.ReferenceLoader):
|
||||
class XgenLoader(plugin.ReferenceLoader):
|
||||
"""Load Xgen as reference"""
|
||||
|
||||
product_types = {"xgen"}
|
||||
|
|
@ -1,21 +1,17 @@
|
|||
import os
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from collections import defaultdict
|
||||
|
||||
import clique
|
||||
from maya import cmds
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
from ayon_core.pipeline import (
|
||||
load,
|
||||
get_representation_path
|
||||
)
|
||||
from ayon_core.hosts.maya.api import lib
|
||||
from ayon_core.hosts.maya.api.yeti import create_yeti_variable
|
||||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.plugin import get_load_color_for_product_type
|
||||
|
||||
from ayon_maya.api import lib
|
||||
from ayon_maya.api.pipeline import containerise
|
||||
from ayon_maya.api import plugin
|
||||
from ayon_maya.api.plugin import get_load_color_for_product_type
|
||||
from ayon_maya.api.yeti import create_yeti_variable
|
||||
from maya import cmds
|
||||
|
||||
# Do not reset these values on update but only apply on first load
|
||||
# to preserve any potential local overrides
|
||||
|
|
@ -45,7 +41,7 @@ def set_attribute(node, attr, value):
|
|||
lib.set_attribute(node, attr, value)
|
||||
|
||||
|
||||
class YetiCacheLoader(load.LoaderPlugin):
|
||||
class YetiCacheLoader(plugin.Loader):
|
||||
"""Load Yeti Cache with one or more Yeti nodes"""
|
||||
|
||||
product_types = {"yeticache", "yetiRig"}
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
from typing import List
|
||||
|
||||
import maya.cmds as cmds
|
||||
|
||||
from ayon_core.hosts.maya.api import plugin
|
||||
from ayon_core.hosts.maya.api import lib
|
||||
|
||||
from ayon_core.pipeline import registered_host
|
||||
from ayon_core.pipeline.create import CreateContext
|
||||
from ayon_maya.api import lib, plugin
|
||||
|
||||
|
||||
class YetiRigLoader(plugin.ReferenceLoader):
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import pyblish.api
|
||||
|
||||
import maya.cmds as cmds
|
||||
import pyblish.api
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class CollectAnimationOutputGeometry(pyblish.api.InstancePlugin):
|
||||
class CollectAnimationOutputGeometry(plugin.MayaInstancePlugin):
|
||||
"""Collect out hierarchy data for instance.
|
||||
|
||||
Collect all hierarchy nodes which reside in the out_SET of the animation
|
||||
|
|
@ -18,7 +18,6 @@ class CollectAnimationOutputGeometry(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.CollectorOrder + 0.4
|
||||
families = ["animation"]
|
||||
label = "Collect Animation Output Geometry"
|
||||
hosts = ["maya"]
|
||||
|
||||
ignore_type = ["constraints"]
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
import pyblish.api
|
||||
from ayon_maya.api.lib import get_all_children
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds
|
||||
|
||||
import pyblish.api
|
||||
from ayon_core.hosts.maya.api.lib import get_all_children
|
||||
|
||||
|
||||
class CollectArnoldSceneSource(pyblish.api.InstancePlugin):
|
||||
class CollectArnoldSceneSource(plugin.MayaInstancePlugin):
|
||||
"""Collect Arnold Scene Source data."""
|
||||
|
||||
# Offset to be after renderable camera collection.
|
||||
|
|
@ -1,14 +1,20 @@
|
|||
"""Collect all relevant assembly items.
|
||||
|
||||
Todo:
|
||||
Publish of assembly need unique namespace for all assets, we should
|
||||
create validator for this.
|
||||
|
||||
"""
|
||||
from collections import defaultdict
|
||||
import pyblish.api
|
||||
|
||||
from maya import cmds, mel
|
||||
from ayon_core.hosts.maya import api
|
||||
from ayon_core.hosts.maya.api import lib
|
||||
|
||||
# TODO : Publish of assembly: -unique namespace for all assets, VALIDATOR!
|
||||
from ayon_maya import api
|
||||
from ayon_maya.api import lib
|
||||
from ayon_maya.api import plugin
|
||||
|
||||
|
||||
class CollectAssembly(pyblish.api.InstancePlugin):
|
||||
class CollectAssembly(plugin.MayaInstancePlugin):
|
||||
"""Collect all relevant assembly items
|
||||
|
||||
Collected data:
|
||||
|
|
@ -1,15 +1,13 @@
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds
|
||||
|
||||
|
||||
class CollectCurrentFile(pyblish.api.ContextPlugin):
|
||||
class CollectCurrentFile(plugin.MayaContextPlugin):
|
||||
"""Inject the current working file."""
|
||||
|
||||
order = pyblish.api.CollectorOrder - 0.4
|
||||
label = "Maya Current File"
|
||||
hosts = ['maya']
|
||||
|
||||
def process(self, context):
|
||||
"""Inject the current working file"""
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from maya import cmds # noqa
|
||||
import pyblish.api
|
||||
from ayon_core.pipeline import OptionalPyblishPluginMixin
|
||||
from ayon_maya.api import plugin
|
||||
from maya import cmds # noqa
|
||||
|
||||
|
||||
class CollectFbxAnimation(pyblish.api.InstancePlugin,
|
||||
class CollectFbxAnimation(plugin.MayaInstancePlugin,
|
||||
OptionalPyblishPluginMixin):
|
||||
"""Collect Animated Rig Data for FBX Extractor."""
|
||||
|
||||
order = pyblish.api.CollectorOrder + 0.2
|
||||
label = "Collect Fbx Animation"
|
||||
hosts = ["maya"]
|
||||
families = ["animation"]
|
||||
optional = True
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue