diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/export_map.py | 6 | ||||
-rw-r--r-- | release/scripts/md2_export.py | 3 |
2 files changed, 7 insertions, 2 deletions
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') 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 |