Merge pull request #5143 from ynput/bugfix/OP-6161_Maya-Ass-loader-for-model-family-errors-out-if-the-files-are-extracted-from-other-dccs

This commit is contained in:
Milan Kolar 2023-06-19 17:55:47 +02:00 committed by GitHub
commit f58c414f04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,9 +35,15 @@ class ArnoldStandinLoader(load.LoaderPlugin):
color = "orange"
def load(self, context, name, namespace, options):
if not cmds.pluginInfo("mtoa", query=True, loaded=True):
cmds.loadPlugin("mtoa")
# Create defaultArnoldRenderOptions before creating aiStandin
# which tries to connect it. Since we load the plugin and directly
# create aiStandin without the defaultArnoldRenderOptions,
# we need to create the render options for aiStandin creation.
from mtoa.core import createOptions
createOptions()
# Make sure to load arnold before importing `mtoa.ui.arnoldmenu`
cmds.loadPlugin("mtoa", quiet=True)
import mtoa.ui.arnoldmenu
version = context['version']