@@ -243,7 +243,7 @@ public class ExportSettings : ScriptableSingleton<ExportSettings>
243
243
//Any additional names require a space after the name
244
244
public const string kMaxOptionName = "3ds Max " ;
245
245
public const string kMayaOptionName = "Maya " ;
246
- public const string kMayaLtOptionName = "MayaLT " ;
246
+ public const string kMayaLtOptionName = "Maya LT " ;
247
247
248
248
private static string DefaultIntegrationSavePath {
249
249
get {
@@ -447,10 +447,24 @@ private int ChoosePreferredDCCApp(int optionA, int optionB)
447
447
return - 1 ;
448
448
}
449
449
450
- //We assume that the option names have a
451
- int scoreA = s_PreferenceList . IndexOf ( appA . Split ( ' ' ) [ 0 ] ) ;
452
- int scoreB = s_PreferenceList . IndexOf ( appB . Split ( ' ' ) [ 0 ] ) ;
450
+ int scoreA = - 1 ;
451
+ int scoreB = - 1 ;
453
452
453
+ for ( int i = 0 ; i < s_PreferenceList . Count ; i ++ )
454
+ {
455
+ if ( appA . StartsWith ( s_PreferenceList [ i ] ) )
456
+ {
457
+ scoreA = i ;
458
+ }
459
+ }
460
+
461
+ for ( int i = 0 ; i < s_PreferenceList . Count ; i ++ )
462
+ {
463
+ if ( appB . StartsWith ( s_PreferenceList [ i ] ) )
464
+ {
465
+ scoreB = i ;
466
+ }
467
+ }
454
468
return scoreA < scoreB ? optionA : optionB ;
455
469
}
456
470
@@ -479,13 +493,18 @@ private static int FindDCCVersion(string AppName)
479
493
{
480
494
return version ;
481
495
}
496
+ else if ( AppName . Contains ( "LT" ) )
497
+ {
498
+ int . TryParse ( number . Substring ( 2 ) , out version ) ;
499
+ return version ;
500
+ }
482
501
else
483
502
{
484
503
float fVersion ;
485
504
//In case we are looking at something with a decimal based version- the int parse will fail so we'll need to parse it as a float.
486
505
if ( float . TryParse ( number , out fVersion ) )
487
506
{
488
- return ( int ) fVersion ;
507
+ return ( int ) fVersion ;
489
508
}
490
509
return - 1 ;
491
510
}
0 commit comments