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-08-06 17:30:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-06 17:30:23 +0400
commitd608d3358393ad682567026fc9dfc5632a567511 (patch)
treec15940ce0ae31a03f7d3db203e408370c478a937 /release
parent5763746af7f1d076c199328f9dc463639057fb66 (diff)
output the origin for each map node.
thanks to j michaelson for the patch
Diffstat (limited to 'release')
-rw-r--r--release/scripts/export_map.py6
1 files changed, 5 insertions, 1 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')