[Bf-extensions-cvs] [544a5a6] master: FBX export: add support for ortho cameras.

Bastien Montagne noreply at git.blender.org
Sun Aug 10 18:00:30 CEST 2014


Commit: 544a5a6d80ca167cac3e8b5c47aad8bdd20eaf5e
Author: Bastien Montagne
Date:   Sun Aug 10 18:00:08 2014 +0200
Branches: master
https://developer.blender.org/rBA544a5a6d80ca167cac3e8b5c47aad8bdd20eaf5e

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