Page 1 of 1

2.54 beta Exporting 3ds couses errors

Posted: Wed Sep 29, 2010 11:19 pm
by ninodelafortuna
Hello i'm new.

I tried to export model from blender 2.54beta to 3ds but i get this kind of error:
Traceback (most recent call last):
File "C:\Users\Sebastian\AppData\Roaming\Blender Foundation\Blender\2.54\scrip
ts\op\io_scene_3ds\", line 58, in execute
return, context, **
File "C:\Users\Sebastian\AppData\Roaming\Blender Foundation\Blender\2.54\scrip
ts\op\io_scene_3ds\", line 969, in save
object_info.add_subchunk(make_material_chunk(mat_and_image[0], mat_and_image
File "C:\Users\Sebastian\AppData\Roaming\Blender Foundation\Blender\2.54\scrip
ts\op\io_scene_3ds\", line 473, in make_material_chunk
material_chunk.add_subchunk(make_material_texture_chunk(MATMAP, images))
File "C:\Users\Sebastian\AppData\Roaming\Blender Foundation\Blender\2.54\scrip
ts\op\io_scene_3ds\", line 440, in make_material_texture_chunk
File "C:\Users\Sebastian\AppData\Roaming\Blender Foundation\Blender\2.54\scrip
ts\op\io_scene_3ds\", line 434, in add_image
filename = os.path.basename(image.filepath)
NameError: global name 'os' is not defined
Can anybody tell me if it's common problem or i did something wrong?
My model is a simple object with default material and texture (jpg image 512x512 ).
Problem doesn't exist when I remove material.

Maybe i have to install Python or something. My current version is Python 2.66 amd64. I'm using Win7 64bit.

Posted: Tue Oct 05, 2010 9:27 am
by tushantin
Hmm your best bet would be to ditch the materials and use 3DsMax's material tool. :?

I'm having 3Ds export problems too though (Blender 2.54, Win32 Zip). After exporting all my 4-sided polygons turn to 3-side and quite a lot of normals and vertices shift and separate, forcing me to use Collada format instead (can't seem to export in FBX and OBJ for some reason).

Posted: Tue Oct 05, 2010 11:49 am
by ninodelafortuna
hi tushantin. Thanks for Your advice. I'm importing 3ds files into Away3d/Flash application. I need files to be small. So i can't use collada format.

I solved my problem this way:
- after baking texture I save it to JPG file
- I delete material linked to the Object ( problem exist when object has material)
- then export to 3ds file
- I put source paths to the texture files and 3ds models in a XML file I've created ( simple furniture library )
- in Action Script I load a model and texture separately using XML library

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<furnitures name="Sypialnia">
<elem thumb="model_01.jpg" model="model_01.3ds" >
<texture name="Texture 1" src="model_01_tex1.jpg"></texture>
<texture name="Texture 2" src="model_01_tex2.jpg"></texture>
<texture name="Texture 3" src="model_01_tex3.jpg"></texture>
<elem thumb="model_02.jpg" model="model_02.3ds" >
<texture name="Texture 1" src="model_02_tex1.jpg"></texture>
<texture name="Texture 2" src="model_02_tex2.jpg"></texture>
<texture name="Texture 3" src="model_02_tex3.jpg"></texture>
<elem thumb="model_03.jpg" model="model_03.3ds" >
<texture name="Texture 1" src="model_03_tex1.jpg"></texture>
<texture name="Texture 2" src="model_03_tex2.jpg"></texture>
<texture name="Texture 3" src="model_03_tex3.jpg"></texture>

It works