Update openpype/hosts/maya/plugins/load/load_arnold_standin.py

Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com>
This commit is contained in:
Toke Jepsen 2023-02-14 15:32:54 +00:00 committed by GitHub
parent 75dfd6c3f6
commit 6bdbdd4337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,20 +65,20 @@ class ArnoldStandinLoader(load.LoaderPlugin):
# Create transform with shape
transform_name = label + "_standin"
standinShape = mtoa.ui.arnoldmenu.createStandIn()
standin = cmds.listRelatives(standinShape, parent=True)[0]
standin_shape = mtoa.ui.arnoldmenu.createStandIn()
standin = cmds.listRelatives(standin_shape, parent=True)[0]
standin = cmds.rename(standin, transform_name)
standinShape = cmds.listRelatives(standin, shapes=True)[0]
standin_shape = cmds.listRelatives(standin, shapes=True)[0]
cmds.parent(standin, root)
# Set the standin filepath
path, operator = self._setup_proxy(
standinShape, self.fname, namespace
standin_shape, self.fname, namespace
)
cmds.setAttr(standinShape + ".dso", path, type="string")
cmds.setAttr(standin_shape + ".dso", path, type="string")
sequence = is_sequence(os.listdir(os.path.dirname(self.fname)))
cmds.setAttr(standinShape + ".useFrameExtension", sequence)
cmds.setAttr(standin_shape + ".useFrameExtension", sequence)
nodes = [root, standin]
if operator is not None: