File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Integrations/Autodesk/maya2017/scripts/unityOneClick Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ private static string GetSceneFilePath ()
50
50
51
51
private static string GetLastSavedFilePath ( )
52
52
{
53
- string modelPath = FbxExporters . EditorTools . ExportSettings . GetAbsoluteSavePath ( ) ;
53
+ string modelPath = Application . dataPath + "/_safe_to_delete" ;
54
54
System . IO . FileInfo fileInfo = GetLastSavedFile ( modelPath ) ;
55
55
56
56
return ( fileInfo != null ) ? fileInfo . FullName : null ;
Original file line number Diff line number Diff line change @@ -131,6 +131,14 @@ def doIt(self, args):
131
131
unityProjectPath = maya .cmds .optionVar (q = 'UnityProject' )
132
132
unityCommand = "FbxExporters.Review.TurnTable.LastSavedModel"
133
133
134
+ # make sure the GamePipeline and fbxmaya plugins are loaded
135
+ if self .loadDependencies () and self .loadPlugin ('fbxmaya.mll' ):
136
+ # save fbx to Assets/_safe_to_delete/
137
+ savePath = "{0}/Assets/_safe_to_delete" .format (unityProjectPath )
138
+ maya .cmds .sysFile (savePath , makeDir = True )
139
+ savePath = savePath + "/TurnTableModel.fbx"
140
+ maya .mel .eval (r'file -force -options "" -typ "FBX export" -pr -es "{0}"' .format (savePath ));
141
+
134
142
if maya .cmds .about (macOS = True ):
135
143
# Use 'open -a' to bring app to front if it has already been started.
136
144
# Note that the unity command will not get called.
You can’t perform that action at this time.
0 commit comments