Hey,
Here's script I cut from some other one. It's a single button which do an "export selected mesh".
Are you able to add to this some code, please
?
-export as fbx (has to be changeable in the code)
-export without pop up windows! (use the last settings; settings could be changed in the file>export>export as pop up window)
-use name of the mesh as the file name
-save it in the provided path (has to be changeable in the code)
At the end of the day we will get an "one click" export button.
ollout ExportPrep "Export Prep" width:80 height:30
(
button btnExpSel "Export Sel" toolTip:"Export Selected"
on btnApEP pressed do
(
local mySpot = [0, 0, 0]
Undo on
for obj in selection do
(
resetxform obj -- This line will cause the max 5 to error, either delete it or add two - to the begining of the line. By Doing so your Xform will no longer reset.
collapsestack obj
case rdoXP.state of
(
1: mySpot.x = obj.min.x
2: mySpot.x = obj.center.x
3: mySpot.x = obj.max.x
)
case rdoYP.state of
(
1: mySpot.y = obj.min.y
2: mySpot.y = obj.center.y
3: mySpot.y = obj.max.y
)
case rdoZP.state of
(
1: mySpot.z = obj.min.z
2: mySpot.z = obj.center.z
3: mySpot.z = obj.max.z
)
obj.pivot = mySpot + [spnXOs.value, spnYOs.value, spnZOs.value]
obj.pos = [0+spnXPos.value, 0+spnYPos.value, 0+spnZPos.value]
)
)
on btnExpSel pressed do
(
actionMan.executeAction 0 "40373" -- File: Export Selected
)
)CreateDialog ExportPrep
)
Replies
Use this:
Since you want to be able to change the extension...
Assuming you select a valid object and that the folder already exists.