KatsBits Community

[FIXED in 2.59] Blender 2.58 .map exporter broken

kat · 10 · 13940

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Note: although this is now fixed it's not currently available in the latest stable version of Blender 2.58, so will likely appear in any updates that may be published in the coming days/weeks.

When exporting meshes using the Quake MAP (.map) AddOn, if meshes have texture images assigned to UVW maps it causes the script to error out with the following (or similar) message;

Code: [Select]
Map Exporter 0.0
        writing cubes from meshes
Traceback (most recent call last):
  File "D:\Program Files\Blender Foundation\Blender 2.58\2.58\scripts\addons\io_
scene_map\__init__.py", line 74, in execute
    return export_map.save(self, context, **keywords)
  File "D:\Program Files\Blender Foundation\Blender 2.58\2.58\scripts\addons\io_
scene_map\export_map.py", line 469, in save
    export_map(context, filepath)
  File "D:\Program Files\Blender Foundation\Blender 2.58\2.58\scripts\addons\io_
scene_map\export_map.py", line 343, in export_map
    write_cube2brush(file, face_group)
  File "D:\Program Files\Blender Foundation\Blender 2.58\2.58\scripts\addons\io_
scene_map\export_map.py", line 78, in write_cube2brush
    file.write(os.path.splitext(os.path.basename(image.filename))[0])
AttributeError: 'Image' object has no attribute 'filename'

location:<unknown location>:-1
location:<unknown location>:-1

The current fix is to make sure that images are not assigned to UVW maps - meshes can have materials and UVW maps, they just can't have images associated with those.

Map export is an AddOn. To enable click "File > User Preferences" then "Import/Export"


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
This exporter is junk :) There is another one, for 2.49b.. Very advanced. Can export simultaneously into .map and .ase (you have to mark what's going to be brush and what misc_model), exports some basic entities and all that good stuff. Sad that no one ported it to 2.5x


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Yeah that's the one the model2map tutorial covers. I was in the middle of updating that when 2.58 was released and news of the exporter inclusion was mentioned. I've not looked at the internals for this new script, all I did was exported some brushwork to see if it worked!. Looks like I'll need to convert the entity helper kit to work properly with 2.49 so it's available for use.

What are you doing to export to ASE with this btw? Just naming a mesh objects name dataID as "misc_model" or some such? I tried it with a couple of "Empty" objects but they don't work.



Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Oh right, not seen that one... too many script versions to keep track off I'm afraid ;) Looks like it's not been updated for some time based on the posts. And yep reading the topic info, it's only ever really going to be relatively generic as an exporter; because the .map format is used by so many games now you can only really include basic entity markers as most of them have their own specific sets, something the author hints at with his posts.


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
That's not really the point of that exporter. You can have any kind of mesh in your scene, and it will be correctly exported as brushes. You can have convex and concave meshes and the exporter will figure it out and split brushes properly. It will also caulk insides and set texture of the outside face to whatever shader you set.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Quake MAP exporter is still broken in the new 2.58.1 release of Blender, this time with a different error. Unlike previous, the error happens regardless as to what state the scene is in so un/textured surfaces err out regardless.;
Code: [Select]
Map Exporter 0.0
        writing cubes from meshes
Traceback (most recent call last):
  File "D:\Program Files\Blender Foundation\Blender 2.58a\2.58\scripts\addons\io
_scene_map\__init__.py", line 74, in execute
    return export_map.save(self, context, **keywords)
  File "D:\Program Files\Blender Foundation\Blender 2.58a\2.58\scripts\addons\io
_scene_map\export_map.py", line 470, in save
    export_map(context, filepath)
  File "D:\Program Files\Blender Foundation\Blender 2.58a\2.58\scripts\addons\io
_scene_map\export_map.py", line 346, in export_map
    elif is_tricyl_facegroup(face_group):
  File "D:\Program Files\Blender Foundation\Blender 2.58a\2.58\scripts\addons\io
_scene_map\export_map.py", line 215, in is_tricyl_facegroup
    if len(f) == 3:
TypeError: object of type 'MeshFace' has no len()

location:<unknown location>:-1

location:<unknown location>:-1


Offline mikshaw

  • Newbie
    • Posts: 14
The new Blender 2.59 changelog lists bug fixes in the map exporter.  Maybe it'll work for you now.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Broken in 2.60. Simple mesh objects export OK, anything with a texture applied doesn't and produces the following;

Code: [Select]
Map Exporter 0.0
        writing cubes from meshes
Traceback (most recent call last):
  File "D:\Program Files\Blender Foundation\Blender 2.60\2.60\scripts\addons\io_
scene_map\__init__.py", line 104, in execute
    return export_map.save(self, context, **keywords)
  File "D:\Program Files\Blender Foundation\Blender 2.60\2.60\scripts\addons\io_
scene_map\export_map.py", line 485, in save
    export_map(context, filepath)
  File "D:\Program Files\Blender Foundation\Blender 2.60\2.60\scripts\addons\io_
scene_map\export_map.py", line 342, in export_map
    write_cube2brush(file, face_group)
  File "D:\Program Files\Blender Foundation\Blender 2.60\2.60\scripts\addons\io_
scene_map\export_map.py", line 71, in write_cube2brush
    if uf and uf.hide:
AttributeError: 'MeshTextureFace' object has no attribute 'hide'

location:<unknown location>:-1

location:<unknown location>:-1