Skip to content

Commit 6a1b1dd

Browse files
committed
code review fixes
1 parent 90a71d3 commit 6a1b1dd

File tree

1 file changed

+11
-3
lines changed
  • Assets/Integrations/Autodesk/maya2017/scripts/unityOneClick

1 file changed

+11
-3
lines changed

Assets/Integrations/Autodesk/maya2017/scripts/unityOneClick/commands.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,18 @@ def loadPlugin(self, plugin):
5858
return True
5959

6060
def loadDependencies(self):
61+
# GamePipeline plugin 'SendToUnitySelection' command used in Publish
62+
pluginsToLoad = ['GamePipeline', 'fbxmaya']
63+
64+
ext = "mll"
6165
if maya.cmds.about(macOS=True):
62-
return self.loadPlugin('GamePipeline.bundle') and self.loadPlugin('fbxmaya.bundle')
63-
else:
64-
return self.loadPlugin('GamePipeline.mll') and self.loadPlugin('fbxmaya.mll')
66+
ext = "bundle"
67+
68+
# iterate over all the plugins, loading them with extenstion ext, and combining the results
69+
# to return if any of the loads failed
70+
return reduce((lambda result, plugin: result and self.loadPlugin("{0}.{1}".format(plugin, ext))),
71+
pluginsToLoad,
72+
True)
6573

6674
def loadUnityFbxExportSettings(self):
6775
"""

0 commit comments

Comments
 (0)