[Bf-extensions-cvs] [8fd98f0] dxf_import: FBX export: add support for ortho cameras.

Bastien Montagne noreply at git.blender.org
Fri Aug 15 12:38:29 CEST 2014


Commit: 8fd98f0b230414548ba7409e8d656627730c7c8e
Author: Bastien Montagne
Date:   Sun Aug 10 18:00:08 2014 +0200
Branches: dxf_import
https://developer.blender.org/rBA8fd98f0b230414548ba7409e8d656627730c7c8e

FBX export: add support for ortho cameras.

===================================================================

M	io_scene_fbx/export_fbx_bin.py

===================================================================

diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 17deee2..228d993 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -669,6 +669,9 @@ def fbx_data_camera_elements(root, cam_obj, scene_data):
     # No need to convert to inches here...
     elem_props_template_set(tmpl, props, "p_double", b"FocalLength", cam_data.lens)
     elem_props_template_set(tmpl, props, "p_double", b"SafeAreaAspectRatio", aspect)
+    # Default to perspective camera.
+    elem_props_template_set(tmpl, props, "p_enum", b"CameraProjectionType", 1 if cam_data.type == 'ORTHO' else 0)
+    elem_props_template_set(tmpl, props, "p_double", b"OrthoZoom", cam_data.ortho_scale)
 
     elem_props_template_set(tmpl, props, "p_double", b"NearPlane", cam_data.clip_start * gscale)
     elem_props_template_set(tmpl, props, "p_double", b"FarPlane", cam_data.clip_end * gscale)



More information about the Bf-extensions-cvs mailing list