Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: CMOD export script breaks under v0.97b, works with v0.97a  (Read 2483 times)

selden

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • Modelling for Celestia
CMOD export script breaks under v0.97b, works with v0.97a
« 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)
Logged
Selden

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1547
    • View Profile
Re: CMOD export script breaks under v0.97b, works with v0.97a
« Reply #1 on: June 20, 2008, 06:53:45 pm »

OK I'll look into it.
Logged

selden

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • Modelling for Celestia
Re: CMOD export script breaks under v0.97b, works with v0.97a
« Reply #2 on: June 20, 2008, 06:59:26 pm »

Thanks!
s.
Logged
Selden

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1547
    • View Profile
Re: CMOD export script breaks under v0.97b, works with v0.97a
« Reply #3 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.
Logged

selden

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • Modelling for Celestia
Re: CMOD export script breaks under v0.97b, works with v0.97a
« Reply #4 on: June 25, 2008, 02:38:20 pm »

Steve,

Thanks again.

Logged
Selden