@@ -127,7 +127,7 @@ def beforeImport(self, retCode, file, clientData):
127
127
# store path and filename
128
128
self ._tempPath = file .resolvedPath ()
129
129
self ._tempName = file .resolvedName ()
130
-
130
+
131
131
# Gather everything that is in the scene
132
132
self ._origItemsInScene = maya .cmds .ls (tr = True , o = True , r = True )
133
133
@@ -142,7 +142,10 @@ def beforeImport(self, retCode, file, clientData):
142
142
# reset attribute values, in case import fails
143
143
self .storeAttribute (self ._exportSet , self ._unityFbxFilePathAttr , "" )
144
144
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
+
146
149
def afterImport (self , * args , ** kwargs ):
147
150
if self ._tempPath :
148
151
self .storeAttribute (self ._exportSet , self ._unityFbxFilePathAttr , self ._tempPath )
@@ -156,7 +159,7 @@ def afterImport(self, *args, **kwargs):
156
159
157
160
# add newly imported items to set
158
161
maya .cmds .sets (newItems , add = self ._exportSet )
159
-
162
+
160
163
def doIt (self , args ):
161
164
self .loadDependencies ()
162
165
0 commit comments