File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Assets/Integrations/Autodesk/max/scripts Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,14 @@ macroScript UnityImport category:"Unity"
37
37
origObjects = objects as array
38
38
callbacks.addScript #postImport (" afterImport()" ) id: #unityPlugin
39
39
40
+ -- set the system units to centimeters
41
+ local origUnits = units.SystemType
42
+ units.SystemType = #Centimeters
43
+
40
44
importFile fbxFileName using: FBXIMP
41
45
46
+ units.SystemType = origUnits
47
+
42
48
unityFbxFilePathAttr = getFilenamePath fbxFileName
43
49
unityFbxFileNameAttr = filenameFromPath fbxFileName
44
50
@@ -83,6 +89,9 @@ macroScript UnityExport category:"Unity"
83
89
select exportSet
84
90
)
85
91
92
+ local origUnits = units.SystemType
93
+ units.SystemType = #Centimeters
94
+
86
95
exportFileName = undefined
87
96
if unityFbxFilePathAttr != undefined and unityFbxFileNameAttr != undefined then (
88
97
exportFileName = unityFbxFilePathAttr + unityFbxFileNameAttr
@@ -96,6 +105,8 @@ macroScript UnityExport category:"Unity"
96
105
exportFile exportFileName #noPrompt selectedOnly: true using: FBXEXP
97
106
)
98
107
108
+ units.SystemType = origUnits
109
+
99
110
if origSelection != undefined then (
100
111
select origSelection
101
112
)
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ FbxExporterSetParam "Lights" true
17
17
FbxExporterSetParam " EmbedTextures" false
18
18
19
19
-- Units
20
- -- FbxExporterSetParam "ScaleFactor" 1
20
+ FbxExporterSetParam " ScaleFactor" 1
21
21
FbxExporterSetParam " ConvertUnit" " cm"
22
22
23
23
-- Axis Conversion
You can’t perform that action at this time.
0 commit comments