@@ -133,8 +133,12 @@ public override void OnInspectorGUI() {
133
133
ExportSettings . DCCType foundDCC = ExportSettings . DCCType . Maya ;
134
134
var foundDCCPath = TryFindDCC ( dccPath , ext , ExportSettings . DCCType . Maya ) ;
135
135
if ( foundDCCPath == null && Application . platform == RuntimePlatform . WindowsEditor ) {
136
- foundDCCPath = TryFindDCC ( dccPath , ext , ExportSettings . DCCType . Max ) ;
137
- foundDCC = ExportSettings . DCCType . Max ;
136
+ if ( ! ExportSettings . IsMax2018OrLater ( dccPath ) ) {
137
+ Debug . LogError ( "3DsMax 2017 or earlier is not supported" ) ;
138
+ } else {
139
+ foundDCCPath = TryFindDCC ( dccPath , ext , ExportSettings . DCCType . Max ) ;
140
+ foundDCC = ExportSettings . DCCType . Max ;
141
+ }
138
142
}
139
143
if ( foundDCCPath == null ) {
140
144
Debug . LogError ( string . Format ( "Could not find supported DCC application at: \" {0}\" " , Path . GetDirectoryName ( dccPath ) ) ) ;
@@ -349,8 +353,12 @@ private static void FindDCCInstalls() {
349
353
}
350
354
351
355
if ( product . StartsWith ( "3ds max" , StringComparison . InvariantCultureIgnoreCase ) ) {
356
+ var exePath = string . Format ( "{0}/{1}" , productDir . FullName . Replace ( "\\ " , "/" ) , "3dsmax.exe" ) ;
357
+ if ( ! IsMax2018OrLater ( exePath ) ) {
358
+ continue ;
359
+ }
352
360
string version = product . Substring ( "3ds max " . Length ) ;
353
- dccOptionPath . Add ( string . Format ( "{0}/{1}" , productDir . FullName . Replace ( " \\ " , "/" ) , "3dsmax.exe" ) ) ;
361
+ dccOptionPath . Add ( exePath ) ;
354
362
dccOptionName . Add ( GetUniqueName ( "3ds Max " + version ) ) ;
355
363
}
356
364
}
@@ -495,6 +503,13 @@ public static string GetMaxOptionName(string exePath){
495
503
return GetUniqueName ( Path . GetFileName ( Path . GetDirectoryName ( exePath ) ) ) ;
496
504
}
497
505
506
+ public static bool IsMax2018OrLater ( string exePath ) {
507
+ var name = Path . GetFileName ( Path . GetDirectoryName ( exePath ) ) . ToLower ( ) ;
508
+ name = name . Replace ( "3ds max" , "" ) . Trim ( ) ;
509
+ int version ;
510
+ return int . TryParse ( name , out version ) && version >= 2018 ;
511
+ }
512
+
498
513
public static string GetSelectedDCCPath ( )
499
514
{
500
515
return instance . dccOptionPaths [ instance . selectedDCCApp ] ;
0 commit comments