From d608d3358393ad682567026fc9dfc5632a567511 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Aug 2009 13:30:23 +0000 Subject: output the origin for each map node. thanks to j michaelson for the patch --- release/scripts/export_map.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/export_map.py b/release/scripts/export_map.py index ab32f6d5ff5..aca02288c7a 100644 --- a/release/scripts/export_map.py +++ b/release/scripts/export_map.py @@ -249,6 +249,10 @@ def write_node_map(file, ob): file.write('{\n') for name_value in props: file.write('"%s" "%s"\n' % name_value) + if PREF_GRID_SNAP.val: + file.write('"origin" "%d %d %d"\n' % tuple([round(axis*PREF_SCALE.val) for axis in ob.getLocation('worldspace')]) ) + else: + file.write('"origin" "%.6f %.6f %.6f"\n' % tuple([axis*PREF_SCALE.val for axis in ob.getLocation('worldspace')]) ) file.write('}\n') return True @@ -447,4 +451,4 @@ def main(): Window.FileSelector(export_map, 'EXPORT MAP', '*.map') if __name__ == '__main__': main() -# export_map('/foo.map') \ No newline at end of file +# export_map('/foo.map') -- cgit v1.2.3 From a791cfc5d3103eab975220144356048b8e1a0149 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 6 Aug 2009 22:24:14 +0000 Subject: [#19206] Fix MD2 Vertex Normal Export from Calvin Loncaric (marvinx03) [#18965] Blender Load and Run need fully qualified specs [#18966] getMaterials not used from Roger Wickes (roger) --- release/scripts/md2_export.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/md2_export.py b/release/scripts/md2_export.py index cf5752597da..f0fe6b9af40 100644 --- a/release/scripts/md2_export.py +++ b/release/scripts/md2_export.py @@ -923,7 +923,8 @@ def fill_md2(md2, object): maxdot = dot; maxdotindex = j; - md2.frames[frame_counter].vertices[vert_counter].lightnormalindex=maxdotindex+2 + # See patch [#19206], gives good info on this line below. + md2.frames[frame_counter].vertices[vert_counter].lightnormalindex=maxdotindex del maxdot, maxdotindex del new_x, new_y, new_z -- cgit v1.2.3