Anim8or Community

General Category => Anim8or v0.98 Discussion Forum => Topic started by: selden on June 20, 2008, 10:09:43 am

Title: CMOD export script breaks under v0.97b, works with v0.97a
Post by: selden on June 20, 2008, 10:09:43 am
The script I've been using to export CMOD models no longer works when run under v0.97b.
No error messages are generated.
It works fine with v0.97a.

The script writes two output files, one listing all materials, the other contains the mesh and vector lists.
An empty material file is written under v0.97b.

The script has not been changed since November 11, 2006.

It's available at http://www.lepp.cornell.edu/~seb/celestia/files/export_cmod_plugin.a8s
(500 lines, 17KB)
Title: Re: CMOD export script breaks under v0.97b, works with v0.97a
Post by: Steve on June 20, 2008, 06:53:45 pm
OK I'll look into it.
Title: Re: CMOD export script breaks under v0.97b, works with v0.97a
Post by: selden on June 20, 2008, 06:59:26 pm
Thanks!
s.
Title: Re: CMOD export script breaks under v0.97b, works with v0.97a
Post by: Steve on June 25, 2008, 06:16:19 am
#097-012 - CMOD Export Script Stopped Working in v0.97b

I've found and fixed the problem.  When I added output to the $console in v0.97b I forgot to initialize the "IsConsole" flag on all code paths.  If it gets a non-zero (uninitialized) value for a file opened in a script,
like the material file in this one, the file wouldn't be closed and the last part of it (all of it for a small file like
material files) would be lost.

Thanks for reporting this! It also breaks the .obj export script and I'm sure a lot of others.  A fix will be in the next preview update.
Title: Re: CMOD export script breaks under v0.97b, works with v0.97a
Post by: selden on June 25, 2008, 02:38:20 pm
Steve,

Thanks again.