mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
bug fix the no object found for group node in load ornatrix cache and load ornatrix alembic not being loaded the outliner color
This commit is contained in:
parent
80e44d2b58
commit
4a5d3224cc
2 changed files with 3 additions and 19 deletions
|
|
@ -30,9 +30,7 @@ class OxAlembicLoader(plugin.ReferenceLoader):
|
|||
)
|
||||
]
|
||||
|
||||
def process_reference(
|
||||
self, context, name=None, namespace=None, options=None
|
||||
):
|
||||
def process_reference(self, context, name, namespace, options):
|
||||
cmds.loadPlugin("Ornatrix", quiet=True)
|
||||
folder_name = context["folder"]["name"]
|
||||
namespace = namespace or unique_namespace(
|
||||
|
|
@ -63,7 +61,8 @@ class OxAlembicLoader(plugin.ReferenceLoader):
|
|||
groupName=group_name,
|
||||
options=ox_import_options
|
||||
)
|
||||
color = plugin.get_load_color_for_product_type("oxacache")
|
||||
|
||||
color = plugin.get_load_color_for_product_type("oxcache")
|
||||
if color is not None:
|
||||
red, green, blue = color
|
||||
cmds.setAttr(group_name + ".useOutlinerColor", 1)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import json
|
||||
import os
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.settings import get_project_settings
|
||||
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 maya import cmds, mel
|
||||
|
||||
|
||||
|
|
@ -46,19 +44,6 @@ class OxCacheLoader(plugin.Loader):
|
|||
for setting in settings["nodes"]:
|
||||
nodes.extend(self.create_node(namespace, path, setting))
|
||||
|
||||
group_name = "{}:{}".format(namespace, name)
|
||||
group_node = cmds.group(nodes, name=group_name)
|
||||
project_name = context["project"]["name"]
|
||||
|
||||
settings = get_project_settings(project_name)
|
||||
color = get_load_color_for_product_type(product_type, settings)
|
||||
if color is not None:
|
||||
red, green, blue = color
|
||||
cmds.setAttr(group_node + ".useOutlinerColor", 1)
|
||||
cmds.setAttr(group_node + ".outlinerColor", red, green, blue)
|
||||
|
||||
nodes.append(group_node)
|
||||
|
||||
self[:] = nodes
|
||||
|
||||
return containerise(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue