1
1
-- MacroScripts that will perform actions
2
2
macroScript UnityImport category: " Unity" tooltip: " Import an FBX file from a Unity project and auto-configure for exporting"
3
3
(
4
+ rootDummyName = " UnityFbxExportSets"
5
+
4
6
origObjects = #()
5
7
currSetName = " "
6
- rootDummyName = " UnityFbxExportSets"
7
8
unityFbxFilePathAttr = " "
8
9
unityFbxFileNameAttr = " "
9
10
unityAnimFileNameAttr = " "
@@ -91,7 +92,7 @@ macroScript UnityImport category:"Unity" tooltip:"Import an FBX file from a Unit
91
92
unityFbxFileName = (filterString unityFbxFileName " @" )[1 ]
92
93
)
93
94
94
- currSetName = unityFbxFileName + " _UnityExportSet "
95
+ currSetName = unityFbxFileName + unityExportSetPostFix
95
96
96
97
callbacks.addScript #postImport (" afterImport()" ) id: #unityPlugin
97
98
@@ -113,6 +114,8 @@ macroScript UnityExportModel category:"Unity" tooltip:"Export models to Unity"
113
114
UnityExportHelpers.exportSelection modelOnly: true
114
115
)
115
116
117
+ global unityExportSetPostFix = " _UnityExportSet"
118
+
116
119
struct UnityImportHelpers (
117
120
fn loadUnityFbxImportSettings = (
118
121
fbxImportSettings = getINISetting (GetMAXIniFile()) " Unity" " UnityFbxImportSettings"
@@ -226,8 +229,9 @@ struct UnityExportHelpers (
226
229
227
230
fn getUnityExportSets = (
228
231
local unityExportSets = #()
232
+ local exportSetPattern = (" *" + unityExportSetPostFix)
229
233
for expSet in selectionSets do (
230
- if (matchPattern expSet.name pattern: " *_UnityExportSet " and
234
+ if (matchPattern expSet.name pattern: exportSetPattern and
231
235
(not isdeleted expSet) and (expSet != undefined ) and
232
236
getNodeByName (expSet.name) != undefined ) do
233
237
(
0 commit comments