mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 10:37:41 -04:00
CWE Directory Reorganization
Rearrange directory structure of CWE to be loosely equivalent to the H'uru Plasma repository. Part 1: Movement of directories and files.
This commit is contained in:
39
Scripts/Max/PlasmaExport.ms
Normal file
39
Scripts/Max/PlasmaExport.ms
Normal file
@ -0,0 +1,39 @@
|
||||
-- Export function, takes an input dir (where max scene files are),
|
||||
-- and an output dir, where the exported files should go
|
||||
--
|
||||
|
||||
function ExportScenes =
|
||||
(
|
||||
scnInDir = GetSavePath caption:"Choose Max Source Directory"
|
||||
if scnInDir == undefined then return "Cancel"
|
||||
scnInDir = scnInDir + "\\"
|
||||
|
||||
scnOutFile = GetSaveFileName caption:"Choose Dest File" types:"PRD(*.prd)|*.prd|"
|
||||
if scnOutFile == undefined then return "Cancel"
|
||||
scnOutDir = getFileNamePath(scnOutFile) + "dat\\"
|
||||
|
||||
makeDir scnOutDir
|
||||
files = getFiles (scnInDir + "*.max")
|
||||
start = timeStamp()
|
||||
for f in files do
|
||||
(
|
||||
format "Exporting file % to %\n" f scnOutFile
|
||||
loadMAXFile f
|
||||
exportFile scnOutFile #noPrompt
|
||||
)
|
||||
end = TimeStamp()
|
||||
format "Exporting took % minutes\n" (( end - start) / 60000.0)
|
||||
)
|
||||
|
||||
|
||||
--
|
||||
-- main
|
||||
--
|
||||
utility main_panel "Build Data"
|
||||
(
|
||||
button convert_scenes "Plasma Exporter"
|
||||
on convert_scenes pressed do
|
||||
(
|
||||
ExportScenes ()
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user