@@ -65,7 +65,7 @@ def loadUnityFbxExportSettings(self):
65
65
Load the Export Settings from file
66
66
"""
67
67
projectPath = maya .cmds .optionVar (q = "UnityProject" )
68
- fileName = "{0}/Assets/{1}" . format (projectPath , maya .cmds .optionVar (q = "UnityFbxExportSettings" ))
68
+ fileName = os . path . join (projectPath , "Assets" , maya .cmds .optionVar (q = "UnityFbxExportSettings" ))
69
69
if not os .path .isfile (fileName ):
70
70
maya .cmds .error ("Failed to find Unity Fbx Export Settings at: {0}" .format (fileName ))
71
71
return False
@@ -231,7 +231,7 @@ def doIt(self, args):
231
231
232
232
unityAppPath = maya .cmds .optionVar (q = 'UnityApp' )
233
233
unityProjectPath = maya .cmds .optionVar (q = 'UnityProject' )
234
- unityTempSavePath = "{0}/Assets/{1}" . format (unityProjectPath , maya .cmds .optionVar (q = 'UnityTempSavePath' ))
234
+ unityTempSavePath = os . path . join (unityProjectPath , "Assets" , maya .cmds .optionVar (q = 'UnityTempSavePath' ))
235
235
unityCommand = "FbxExporters.Review.TurnTable.LastSavedModel"
236
236
237
237
if not self .loadUnityFbxExportSettings ():
@@ -249,8 +249,10 @@ def doIt(self, args):
249
249
# save fbx to Assets/_safe_to_delete/
250
250
savePath = unityTempSavePath
251
251
maya .cmds .sysFile (savePath , makeDir = True )
252
- savePath = savePath + "/TurnTableModel.fbx"
253
- maya .mel .eval (r'file -force -options "" -typ "FBX export" -pr -es "{0}"' .format (savePath ));
252
+ savePath = os .path .join (savePath , "TurnTableModel.fbx" )
253
+ savePath = os .path .abspath (savePath )
254
+
255
+ maya .cmds .file (savePath , force = True , options = "" , typ = "FBX export" , pr = True , es = True )
254
256
255
257
if maya .cmds .about (macOS = True ):
256
258
# Use 'open -a' to bring app to front if it has already been started.
0 commit comments