mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #258 from ynput/bugfix/maya-load-use-correct-product-type
Maya: Load plugins use correct source for product type
This commit is contained in:
commit
4848d95dbc
11 changed files with 11 additions and 36 deletions
|
|
@ -32,10 +32,7 @@ class RedshiftProxyLoader(load.LoaderPlugin):
|
|||
|
||||
def load(self, context, name=None, namespace=None, options=None):
|
||||
"""Plugin entry point."""
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "redshiftproxy"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
folder_name = context["folder"]["name"]
|
||||
namespace = namespace or unique_namespace(
|
||||
|
|
|
|||
|
|
@ -117,11 +117,7 @@ class ReferenceLoader(plugin.ReferenceLoader):
|
|||
def process_reference(self, context, name, namespace, options):
|
||||
import maya.cmds as cmds
|
||||
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "model"
|
||||
|
||||
product_type = context["product"]["productType"]
|
||||
project_name = context["project"]["name"]
|
||||
# True by default to keep legacy behaviours
|
||||
attach_to_root = options.get("attach_to_root", True)
|
||||
|
|
|
|||
|
|
@ -25,10 +25,7 @@ class LoadVDBtoArnold(load.LoaderPlugin):
|
|||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "vdbcache"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
# Check if the plugin for arnold is available on the pc
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -31,10 +31,7 @@ class LoadVDBtoRedShift(load.LoaderPlugin):
|
|||
from ayon_core.hosts.maya.api.pipeline import containerise
|
||||
from ayon_core.hosts.maya.api.lib import unique_namespace
|
||||
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "vdbcache"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
# Check if the plugin for redshift is available on the pc
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -94,10 +94,7 @@ class LoadVDBtoVRay(load.LoaderPlugin):
|
|||
"Path does not exist: %s" % path
|
||||
)
|
||||
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "vdbcache"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
# Ensure V-ray is loaded with the vrayvolumegrid
|
||||
if not cmds.pluginInfo("vrayformaya", query=True, loaded=True):
|
||||
|
|
|
|||
|
|
@ -47,10 +47,7 @@ class VRayProxyLoader(load.LoaderPlugin):
|
|||
|
||||
"""
|
||||
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "vrayproxy"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
# get all representations for this version
|
||||
filename = self._get_abc(
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@ class VRaySceneLoader(load.LoaderPlugin):
|
|||
color = "orange"
|
||||
|
||||
def load(self, context, name, namespace, data):
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "vrayscene_layer"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
folder_name = context["folder"]["name"]
|
||||
namespace = namespace or unique_namespace(
|
||||
|
|
|
|||
|
|
@ -56,10 +56,7 @@ class YetiCacheLoader(load.LoaderPlugin):
|
|||
|
||||
"""
|
||||
|
||||
try:
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
except ValueError:
|
||||
product_type = "yeticache"
|
||||
product_type = context["product"]["productType"]
|
||||
|
||||
# Build namespace
|
||||
folder_name = context["folder"]["name"]
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class AnimationAlembicLoader(plugin.Loader):
|
|||
root = unreal_pipeline.AYON_ASSET_DIR
|
||||
folder_name = context["folder"]["name"]
|
||||
folder_path = context["folder"]["path"]
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
product_type = context["product"]["productType"]
|
||||
suffix = "_CON"
|
||||
if folder_name:
|
||||
asset_name = "{}_{}".format(folder_name, name)
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ class LayoutLoader(plugin.Loader):
|
|||
"loader": str(self.__class__.__name__),
|
||||
"representation": context["representation"]["id"],
|
||||
"parent": context["representation"]["versionId"],
|
||||
"family": context["representation"]["context"]["family"],
|
||||
"family": context["product"]["productType"],
|
||||
"loaded_assets": loaded_assets
|
||||
}
|
||||
imprint(
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ class ExistingLayoutLoader(plugin.Loader):
|
|||
|
||||
folder_name = context["folder"]["name"]
|
||||
folder_path = context["folder"]["path"]
|
||||
product_type = context["representation"]["context"]["family"]
|
||||
product_type = context["product"]["productType"]
|
||||
asset_name = f"{folder_name}_{name}" if folder_name else name
|
||||
container_name = f"{folder_name}_{name}_CON"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue