Failsafe for mtoa not loaded and user feedback.

This commit is contained in:
Toke Stuart Jepsen 2023-03-17 07:47:19 +00:00
parent 1048f58db3
commit 214b76796c

View file

@ -251,12 +251,23 @@ class MayaLookAssignerWindow(QtWidgets.QWidget):
vrayproxy_assign_look(vp, subset_name)
nodes = list(set(item["nodes"]).difference(vray_proxies))
else:
self.echo(
"Could not assign to VRayProxy because vrayformaya plugin "
"is not loaded."
)
# Assign Arnold Standin look.
arnold_standins = set(cmds.ls(type="aiStandIn", long=True))
for standin in arnold_standins:
if standin in nodes:
arnold_standin.assign_look(standin, subset_name)
if cmds.pluginInfo("mtoa", query=True, loaded=True):
arnold_standins = set(cmds.ls(type="aiStandIn", long=True))
for standin in arnold_standins:
if standin in nodes:
arnold_standin.assign_look(standin, subset_name)
else:
self.echo(
"Could not assign to aiStandIn because mtoa plugin is not "
"loaded."
)
nodes = list(set(item["nodes"]).difference(arnold_standins))