mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
update the loader and creator
This commit is contained in:
parent
9cbac449fd
commit
119bb1a586
2 changed files with 4 additions and 7 deletions
|
|
@ -18,9 +18,6 @@ class CreateRedshiftProxy(plugin.MaxCreator):
|
|||
instance_data,
|
||||
pre_create_data) # type: CreatedInstance
|
||||
container = rt.getNodeByName(instance.data.get("instance_node"))
|
||||
# TODO: Disable "Add to Containers?" Panel
|
||||
# parent the selected cameras into the container
|
||||
|
||||
for obj in sel_obj:
|
||||
obj.parent = container
|
||||
# for additional work on the node:
|
||||
# instance_node = rt.getNodeByName(instance.get("instance_node"))
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ from openpype.hosts.max.api import lib
|
|||
|
||||
|
||||
class RedshiftProxyLoader(load.LoaderPlugin):
|
||||
"""Redshift Proxy Loader"""
|
||||
|
||||
label = "Load Redshift Proxy"
|
||||
families = ["redshiftproxy"]
|
||||
representations = ["rs"]
|
||||
order = -9
|
||||
|
|
@ -21,7 +21,7 @@ class RedshiftProxyLoader(load.LoaderPlugin):
|
|||
def load(self, context, name=None, namespace=None, data=None):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
filepath = os.path.normpath(self.fname)
|
||||
filepath = self.filepath_from_context(context)
|
||||
rs_proxy = rt.RedshiftProxy()
|
||||
rs_proxy.file = filepath
|
||||
files_in_folder = os.listdir(os.path.dirname(filepath))
|
||||
|
|
@ -30,7 +30,7 @@ class RedshiftProxyLoader(load.LoaderPlugin):
|
|||
rs_proxy.is_sequence = True
|
||||
|
||||
container = rt.container()
|
||||
container.name = f"{name}"
|
||||
container.name = name
|
||||
rs_proxy.Parent = container
|
||||
|
||||
asset = rt.getNodeByName(f"{name}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue