@@ -392,19 +392,13 @@ public static void InstallMayaIntegration ()
392
392
393
393
class MaxIntegration
394
394
{
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";
401
395
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 ;
404
397
405
398
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" ;
408
402
409
403
private const string PluginSourceTag = "{UnityPluginScript_Source}" ;
410
404
private const string PluginNameTag = "{UnityPluginScript_Name}" ;
@@ -417,7 +411,7 @@ private static string GetMaxExe(){
417
411
private static string GetInstallScript ( ) {
418
412
Dictionary < string , string > Tokens = new Dictionary < string , string > ( )
419
413
{
420
- { PluginSourceTag , Application . dataPath + "/" + PluginPath } ,
414
+ { PluginSourceTag , ( Application . dataPath + "/" + PluginPath ) } ,
421
415
{ PluginNameTag , PluginName }
422
416
} ;
423
417
@@ -471,17 +465,5 @@ public static int InstallMaxPlugin(){
471
465
}
472
466
return ExitCode ;
473
467
}
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
- }*/
486
468
}
487
469
}
0 commit comments