Skip to content

Commit 170d230

Browse files
committed
fix quoting so maxscript gets copied
also remove some commented out/unused code
1 parent e418961 commit 170d230

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

Assets/FbxExporters/Editor/InstallIntegration.cs

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -392,19 +392,13 @@ public static void InstallMayaIntegration ()
392392

393393
class MaxIntegration
394394
{
395-
// get version of Max
396-
// find 3dsmax.ini file (in the AppData)
397-
// get startup path from .ini file
398-
// copy .ms file to startup path
399-
400-
//private const string MaxIni = "3dsmax.ini";
401395
private const string PluginName = "unityOneClickPlugin.ms";
402-
private const string PluginPath = "Integrations/Autodesk/max/scripts/" + PluginName;
403-
//private const string InstallMaxScript = "Integrations/Autodesk/max/scripts/unityPluginInstall.ms";
396+
private const string PluginPath = "FbxExporters/Integrations/Autodesk/max/scripts/" + PluginName;
404397

405398
private const string InstallMaxScriptTemplate =
406-
@"startupScriptPath = pathConfig.GetDir(#userStartupScripts);" +
407-
@"copyFile \""{UnityPluginScript_Source}\"" (startupScriptPath + \""/{UnityPluginScript_Name}\"")";
399+
@"temp = pathConfig.GetDir(#userStartupScripts) + \""/{UnityPluginScript_Name}\"";" +
400+
@"deleteFile temp;" +
401+
@"copyFile \""{UnityPluginScript_Source}\"" temp";
408402

409403
private const string PluginSourceTag = "{UnityPluginScript_Source}";
410404
private const string PluginNameTag = "{UnityPluginScript_Name}";
@@ -417,7 +411,7 @@ private static string GetMaxExe(){
417411
private static string GetInstallScript(){
418412
Dictionary<string,string> Tokens = new Dictionary<string,string>()
419413
{
420-
{PluginSourceTag, Application.dataPath + "/" + PluginPath },
414+
{PluginSourceTag, (Application.dataPath + "/" + PluginPath) },
421415
{PluginNameTag, PluginName }
422416
};
423417

@@ -471,17 +465,5 @@ public static int InstallMaxPlugin(){
471465
}
472466
return ExitCode;
473467
}
474-
475-
/*private string AppDataPath{
476-
get{
477-
return Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);
478-
}
479-
}
480-
481-
//C:/Users/Viktoria/AppData/Local/Autodesk/3dsMax/2017 - 64bit/ENU
482-
private string GetMaxIniPath(){
483-
var appData = AppDataPath;
484-
return null;
485-
}*/
486468
}
487469
}

0 commit comments

Comments
 (0)