@@ -5,6 +5,11 @@ global string $UnityFbxAnimFileNameAttr = "unityFbxAnimFileName";
5
5
global string $UnityFbxNamespaceAttr = "unityFbxNamespace";
6
6
global string $UnityExportSetNameFormat = "^1s_UnityExportSet";
7
7
8
+ // global string $UnityModuleName = "UnityFbxForMaya";
9
+
10
+ global string $UnityDefaultImportSettingsFileName = "unityFbxImportSettings.mel";
11
+ global string $UnityDefaultExportSettingsFileName = "unityFbxExportSettings.mel";
12
+
8
13
global int $UnityFbxFilePathIndex = 0;
9
14
global int $UnityFbxFileNameIndex = 1;
10
15
global int $UnityFbxAnimFilePathIndex = 2;
@@ -28,9 +33,12 @@ global proc unityRemoveNativeMenuOnLoad(){
28
33
proc int loadUnityFbxSettings(string $fileName, string $settingType){
29
34
// check if the file exists
30
35
if (`file -q -ex $fileName` == false){
31
- error ("Failed to find Unity Fbx "+$settingType+" Settings at: " + $fileName);
32
- return false;
36
+ //error ("Failed to find Unity Fbx "+$settingType+" Settings at: " + $fileName);
37
+ //return false;
38
+
39
+ // create file with default settings
33
40
}
41
+
34
42
eval ("source \"" + $fileName + "\"");
35
43
return true;
36
44
}
@@ -46,6 +54,14 @@ proc int loadUnityFbxExportSettings(){
46
54
// Load the Import Settings from a file
47
55
proc int loadUnityFbxImportSettings(){
48
56
$fileName = `optionVar -q "UnityFbxImportSettings"`;
57
+
58
+ // if no filename set (optionVar cleared), reset it to default filename
59
+ if ($fileName == 0){
60
+ //$modulePath = `moduleInfo -moduleName $UnityModuleName -path`;
61
+ // {$modulePath}/scripts/{$UnityDefaultImportSettingsFileName}
62
+
63
+ }
64
+
49
65
return loadUnityFbxSettings($fileName, "Import");
50
66
}
51
67
0 commit comments