Skip to content

Commit 64f98d9

Browse files
authored
Merge pull request #103 from Unity-Technologies/UNI-23011-showstopper-fix
Uni 23011 showstopper fix
2 parents c7f3b13 + 312aa51 commit 64f98d9

File tree

1 file changed

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

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def beforeImport(self, retCode, file, clientData):
127127
# store path and filename
128128
self._tempPath = file.resolvedPath()
129129
self._tempName = file.resolvedName()
130-
130+
131131
# Gather everything that is in the scene
132132
self._origItemsInScene = maya.cmds.ls(tr=True, o=True, r=True)
133133

@@ -142,7 +142,10 @@ def beforeImport(self, retCode, file, clientData):
142142
# reset attribute values, in case import fails
143143
self.storeAttribute(self._exportSet, self._unityFbxFilePathAttr, "")
144144
self.storeAttribute(self._exportSet, self._unityFbxFileNameAttr, "")
145-
145+
146+
# Let Maya know we're OK with importing this file.
147+
OpenMaya.MScriptUtil.setBool(retCode, True)
148+
146149
def afterImport(self, *args, **kwargs):
147150
if self._tempPath:
148151
self.storeAttribute(self._exportSet, self._unityFbxFilePathAttr, self._tempPath)
@@ -156,7 +159,7 @@ def afterImport(self, *args, **kwargs):
156159

157160
# add newly imported items to set
158161
maya.cmds.sets(newItems, add=self._exportSet)
159-
162+
160163
def doIt(self, args):
161164
self.loadDependencies()
162165

0 commit comments

Comments
 (0)