readblend bug

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
tecan
Posts: 4
Joined: Tue Jan 06, 2009 6:56 pm

readblend bug

Post by tecan »

/bullet-SVN/Extras/readblend it has issues with reading a 64 bit .blend file i cannot make it work for the life of me.

http://tecan.ath.cx/test.blend << simple cube example to try.
tecan
Posts: 4
Joined: Tue Jan 06, 2009 6:56 pm

Re: readblend bug

Post by tecan »

Code: Select all

  /* Read the STRC table */

  fprintf(stderr, "reading the STRC table\n");

  MY_SEEK(file, strc_offs);

  {

    int i,j;

    for (i=0; i<strc_ents; ++i) {

      unsigned short struc_type_index, num_fields;

      struc_type_index = read_ushort(file);

      num_fields = read_ushort(file);

      bf->types[struc_type_index].is_struct = 1;

      EXPANDO(bf->strc_indices, struc_type_index);

      /*dprintf(stderr, "\n%s: ", bf->types[struc_type_index].name); */

      for (j=0; j<num_fields; ++j) {

	unsigned short ftype = read_ushort(file);

	unsigned short fname = read_ushort(file);

	EXPANDO(bf->types[struc_type_index].fieldtypes, ftype);

	EXPANDO(bf->types[struc_type_index].fieldnames, fname);

	/*dprintf(stderr, "%s %s ,  ", bf->types[ftype].name, bf->names[fname]); */

      }

    }

  }
it seems to work good up to GPdata...
after i comment out the dprintf i get
bGPdata: ListBase layers , int flag , short sbuffer_size , short sbuffer_sflag , void *sbuffer , Segmentation fault
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: readblend bug

Post by Erwin Coumans »

.blend files generated on 64bit and/or big-endian machines are not supported.

As a work-around, you can load/save the .blend file using Blender on a 32bit (or little-endian) machine, and you are good to go.

If you add support for this, we welcome patches!
Thanks,
Erwin
tecan
Posts: 4
Joined: Tue Jan 06, 2009 6:56 pm

Re: readblend bug

Post by tecan »

I would not even know where to start and i accidently converted 400 quake 2 levels to blender on 64 bit... now im kinda stuck.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: readblend bug

Post by Erwin Coumans »

tecan wrote:I would not even know where to start and i accidently converted 400 quake 2 levels to blender on 64 bit... now im kinda stuck.
Just open the .blend files on a 32bit little-endian Blender version, and save it again.

Can you share a few of those quake levels with packed textures? I'll convert one or two if we can include them in the gamekit as example.
Thanks,
Erwin
tecan
Posts: 4
Joined: Tue Jan 06, 2009 6:56 pm

Re: readblend bug

Post by tecan »

all meshes joined to one. 64 bit
http://www.xup.in/dl,94211581/huge-Action.blend.7z

i would covert all of them but not for a while its easier for me to export to other formats atm.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: readblend bug

Post by Erwin Coumans »

Attached is the 32bit little-endian .blend

Indexed 8-bit TGA textures are not supported by Irrlicht, so textures are not visible.
Thanks,
Erwin
Attachments
huge-Action._littleendianblend.zip
(748.53 KiB) Downloaded 453 times
Post Reply