khanat-opennel-code/code/nel/tools/build_gamedata/generators/max_exporter_scripts/pacs_prim.ms
kaetemi 96935c5be2 Added: #929 Generators for ecosystem projects, all four ecosystem projects, generators for max exporter scripts, rbank cmb export.
Changed: #929 Improved skipping of exported max files, corrected search paths for some tools configurations.
2010-09-03 12:37:35 +02:00

47 lines
967 B
Text

fn runNelMaxExport inputMaxFile =
(
outputNelFile = ("%OutputDirectory%/" + (getFilenameFile inputMaxFile) + ".%PreGenFileExtension%")
tagThisFile = false
-- Unhide category
unhidecategory()
-- Select none
max select none
-- Select all PACS primitives
for i in geometry do
(
if ((classof i) == nel_pacs_cylinder) or ((classof i) == nel_pacs_box) then
selectmore i
)
-- Array of node
arrayNode = selection as array
-- Something to export ?
if (arrayNode.count != 0) then
(
-- Export the collision
if (NelExportPACSPrimitives arrayNode outputNelFile) == false then
(
nlerror("ERROR exporting PACS primitives in file " + inputMaxFile)
tagThisFile = false
)
else
(
nlerror("OK PACS primitives in file " + inputMaxFile)
tagThisFile = true
)
)
else
(
nlerror("WARNING no PACS primitives in file " + inputMaxFile)
tagThisFile = true
)
return tagThisFile
)