Skip to content

Commit 7e0f604

Browse files
committed
save to temporary location with Review command
1 parent 80e99ec commit 7e0f604

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Assets/FbxExporters/Editor/ReviewLastSavedModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static string GetSceneFilePath ()
5050

5151
private static string GetLastSavedFilePath ()
5252
{
53-
string modelPath = FbxExporters.EditorTools.ExportSettings.GetAbsoluteSavePath ();
53+
string modelPath = Application.dataPath + "/_safe_to_delete";
5454
System.IO.FileInfo fileInfo = GetLastSavedFile (modelPath);
5555

5656
return (fileInfo != null) ? fileInfo.FullName : null;

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ def doIt(self, args):
131131
unityProjectPath = maya.cmds.optionVar(q='UnityProject')
132132
unityCommand = "FbxExporters.Review.TurnTable.LastSavedModel"
133133

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+
134142
if maya.cmds.about(macOS=True):
135143
# Use 'open -a' to bring app to front if it has already been started.
136144
# Note that the unity command will not get called.

0 commit comments

Comments
 (0)