update the loader and creator

This commit is contained in:
moonyuet 2023-03-14 16:37:25 +01:00
parent 9cbac449fd
commit 119bb1a586
2 changed files with 4 additions and 7 deletions

View file

@ -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"))

View file

@ -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}")