Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-07-06 15:23:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-06 15:23:22 +0400
commit69df12a74de953224256f68e8fa9a88f73554cae (patch)
tree91159575e91a73836909b5285d49638a5f55222f /release
parent4ebcc7402c89bfd5b3fdcd31a979feb82b306331 (diff)
fix for a bug reported by j michaelson, empty nodes were not exported, also noticed files were invalid if there were no meshes or surfaces.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/export_map.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/release/scripts/export_map.py b/release/scripts/export_map.py
index 7df78fc3c9a..ab32f6d5ff5 100644
--- a/release/scripts/export_map.py
+++ b/release/scripts/export_map.py
@@ -2,14 +2,14 @@
"""
Name: 'Quake 3 (.map)'
-Blender: 243
+Blender: 249
Group: 'Export'
Tooltip: 'Export to Quake map format'
"""
__author__ = 'Campbell Barton'
-__version__ = '0.1'
-__email__ = "cbarton@metavr.com"
+__version__ = '0.1a'
+__email__ = "ideasman42@gmail.com"
__bpydoc__ = """\
This script Exports a Quake 3 map format.
@@ -234,7 +234,7 @@ def write_node_map(file, ob):
as a MAP node as long as it has the property name - classname
returns True/False based on weather a node was written
'''
- props= [(p.name, p.data) for p in ob.properties]
+ props= [(p.name, p.data) for p in ob.game_properties]
IS_MAP_NODE= False
for name, value in props:
@@ -287,7 +287,7 @@ def export_map(filepath):
TOTBRUSH= TOTLAMP= TOTNODE= 0
for ob in Object.GetSelected():
- type= ob.getType()
+ type= ob.type
if type == 'Mesh': obs_mesh.append(ob)
elif type == 'Surf': obs_surf.append(ob)
elif type == 'Lamp': obs_lamp.append(ob)
@@ -406,9 +406,10 @@ NULL
else:
print "NOT EXPORTING PATCH", surf_name, u,v, 'Unsupported'
-
- file.write('}\n') # end worldspan
+
+ if obs_mesh or obs_surf:
+ file.write('}\n') # end worldspan
print '\twriting lamps'