3dmax批量导出FBX、重命名、坐标重置
| 分类: 行业知识分享 |
1.先讲物件批量重命名。
选择Tools(工具)'Rename Objects(重命名对象),弹出Rename Object窗口
2.物件坐标批量重置。
选中所要导出的所有物体,右键点击工具栏Select and
Uniform Scale(选择并统一比例),会弹出Move Transform....窗口。如下图:
3.批量导出FBX。
macroScript BatchExport
ButtonText:"TA ??"
category:"TA ??"
tooltip:"TA ??"
(
rollout TAToolDialog "TA ??"
width:480 height:(240)
(
subRollout plugin01 "plugin01"
pos:[12,12]
)
global batchExport
rollout batchExport
"????FBX"
(
---------------------------------------------------?????
fn init=
(
)
fn replaceSub str1 str2
str3=(
while ((i=findstring str1 str2) !=
undefined) do
(
str1 = replace str1 i str2.count
str3
)
return str1
)
------------------------------------------------UI ??
edittext edittext_exportFolderPath
"????" fieldWidth:400 height:30 labelOnTop:true
readOnly:false
button button_export "??"
width:80
-----------------------------------------------????
on batchExport open do
(
init()
)
on button_export pressed do
(
Sel = Selection as array
for i=1 to Sel.count do(
select Sel[i];
objName=Sel[i].name;--to export
individually, you must select individually
Sel[i].name = replaceSub objName
"*" "_";--????????*????_
)
for i=1 to Sel.count do(
select Sel[i];
objName=Sel[i].name;--to export
individually, you must select individually
exportPath =
edittext_exportFolderPath.text + "/" + (i as String) + "_" +
objName;
exportPath = trimleft
exportPath;
exportPath = trimRight
exportPath;
print exportPath;
exportfile
exportPath #noPrompt selectedOnly:true
using:FBXEXP --print exporterPlugin.classes to
see all formates
)
select Sel;--select back
)
)
Createdialog TAToolDialog
bgcolor:black fgcolor:red lockHeight:false lockWidth:false
addsubrollout TAToolDialog.plugin01
batchExport rolledup:false
TAToolDialog.plugin01.height +=
(200)

加载中…