Changed: #1093 #1092 Stability workarounds for plant shape exporting.

This commit is contained in:
kaetemi 2011-09-21 23:16:03 +02:00
parent 2ca6207037
commit c30e624498
12 changed files with 89 additions and 13 deletions

View file

@ -187,7 +187,7 @@ fn haveCoarseMesh node =
return false return false
) )
fn runNelMaxExport inputMaxFile = fn runNelMaxExportSub inputMaxFile retryCount =
( (
tagThisFile = false tagThisFile = false
@ -354,8 +354,39 @@ fn runNelMaxExport inputMaxFile =
( (
-- Error -- Error
nlerror("WARNING no shape exported from the file " + inputMaxFile) nlerror("WARNING no shape exported from the file " + inputMaxFile)
if tagThisFile then
(
if retryCount < 2 then
(
nlerror("INFO retry this file")
-- Free memory and file handles
gc()
heapfree
-- Reset 3dsmax
resetMAXFile #noprompt
if (loadMaxFile inputMaxFile quiet:true) == true then
(
tagThisFile = runNelMaxExportSub inputMaxFile (retryCount + 1)
)
else
(
-- Error
nlerror("ERROR exporting '%PreGenFileExtension%': can't open the file " + inputMaxFile)
nlerror("FAIL Mysterious error occured")
NelForceQuitRightNow()
)
)
)
) )
return tagThisFile return tagThisFile
) )
fn runNelMaxExport inputMaxFile =
(
return runNelMaxExportSub inputMaxFile 0
)

View file

@ -90,7 +90,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting '%PreGenFileExtension%' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting '%PreGenFileExtension%' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export anim # \brief Export anim
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export anim # Export anim

View file

@ -224,7 +224,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'anim' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'anim' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export clodbank # \brief Export clodbank
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export clodbank # Export clodbank

View file

@ -279,7 +279,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'clod' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'clod' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -328,7 +328,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'ig' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'ig' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export rbank # \brief Export rbank
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export rbank # Export rbank

View file

@ -215,7 +215,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'cmb' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'cmb' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -253,7 +253,7 @@ fn haveCoarseMesh node =
return false return false
) )
fn runNelMaxExport inputMaxFile = fn runNelMaxExportSub inputMaxFile retryCount =
( (
tagThisFile = false tagThisFile = false
@ -420,11 +420,42 @@ fn runNelMaxExport inputMaxFile =
( (
-- Error -- Error
nlerror("WARNING no shape exported from the file " + inputMaxFile) nlerror("WARNING no shape exported from the file " + inputMaxFile)
if tagThisFile then
(
if retryCount < 2 then
(
nlerror("INFO retry this file")
-- Free memory and file handles
gc()
heapfree
-- Reset 3dsmax
resetMAXFile #noprompt
if (loadMaxFile inputMaxFile quiet:true) == true then
(
tagThisFile = runNelMaxExportSub inputMaxFile (retryCount + 1)
)
else
(
-- Error
nlerror("ERROR exporting 'shape': can't open the file " + inputMaxFile)
nlerror("FAIL Mysterious error occured")
NelForceQuitRightNow()
)
)
)
) )
return tagThisFile return tagThisFile
) )
fn runNelMaxExport inputMaxFile =
(
return runNelMaxExportSub inputMaxFile 0
)
removeRunningTag = true removeRunningTag = true
@ -517,7 +548,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'shape' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'shape' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )

View file

@ -6,7 +6,7 @@
# #
# \file 1_export.py # \file 1_export.py
# \brief Export veget # \brief Export veget
# \date 2010-09-26-08-38-GMT # \date 2011-09-21-20-51-GMT
# \author Jan Boon (Kaetemi) # \author Jan Boon (Kaetemi)
# Python port of game data build pipeline. # Python port of game data build pipeline.
# Export veget # Export veget

View file

@ -269,7 +269,9 @@ try
catch catch
( (
-- Error -- Error
nlerror("ERROR fatal error exporting 'veget' in folder %MaxSourceDirectory%") nlerror("ERROR Fatal error exporting 'veget' in folder %MaxSourceDirectory%")
nlerror("FAIL Fatal error occured")
NelForceQuitRightNow()
removeRunningTag = false removeRunningTag = false
) )