[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4658] trunk/py/scripts/addons/ io_scene_fbx: remove XNA hacks
Campbell Barton
ideasman42 at gmail.com
Fri Aug 9 07:18:01 CEST 2013
Revision: 4658
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4658
Author: campbellbarton
Date: 2013-08-09 05:18:00 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
remove XNA hacks
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_fbx/__init__.py
trunk/py/scripts/addons/io_scene_fbx/export_fbx.py
Modified: trunk/py/scripts/addons/io_scene_fbx/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_scene_fbx/__init__.py 2013-08-09 05:17:40 UTC (rev 4657)
+++ trunk/py/scripts/addons/io_scene_fbx/__init__.py 2013-08-09 05:18:00 UTC (rev 4658)
@@ -197,8 +197,6 @@
use_mesh_edges = BoolProperty(
name="Include Edges",
- description=("Edges may not be necessary, can cause import "
- "pipeline errors with XNA"),
default=False,
)
use_armature_deform_only = BoolProperty(
@@ -238,11 +236,6 @@
default=6.0,
)
path_mode = path_reference_mode
- use_rotate_workaround = BoolProperty(
- name="XNA Rotate Animation Hack",
- description="Disable global rotation, for XNA compatibility",
- default=False,
- )
batch_mode = EnumProperty(
name="Batch Mode",
items=(('OFF', "Off", "Active scene to file"),
Modified: trunk/py/scripts/addons/io_scene_fbx/export_fbx.py
===================================================================
--- trunk/py/scripts/addons/io_scene_fbx/export_fbx.py 2013-08-09 05:17:40 UTC (rev 4657)
+++ trunk/py/scripts/addons/io_scene_fbx/export_fbx.py 2013-08-09 05:18:00 UTC (rev 4658)
@@ -223,7 +223,6 @@
use_metadata=True,
path_mode='AUTO',
use_mesh_edges=True,
- use_rotate_workaround=False,
use_default_take=True,
):
@@ -233,10 +232,6 @@
mtx_x90 = Matrix.Rotation(math.pi / 2.0, 3, 'X')
# Used for mesh and armature rotations
mtx4_z90 = Matrix.Rotation(math.pi / 2.0, 4, 'Z')
- # Rotation does not work for XNA animations. I do not know why but they end up a mess! (JCB)
- if use_rotate_workaround:
- # Set rotation to Matrix Identity for XNA (JCB)
- mtx4_z90.identity()
if global_matrix is None:
global_matrix = Matrix()
@@ -485,10 +480,6 @@
rot = tuple(rot.to_euler()) # quat -> euler
scale = tuple(scale)
- # Essential for XNA to use the original matrix not rotated nor scaled (JCB)
- if use_rotate_workaround:
- matrix = ob.matrix_local
-
else:
# This is bad because we need the parent relative matrix from the fbx parent (if we have one), dont use anymore
#if ob and not matrix: matrix = ob.matrix_world * global_matrix
@@ -2291,7 +2282,8 @@
}''' % tmp)
del tmp
- # Bind pose is essential for XNA if the 'MESH' is included (JCB)
+ # Bind pose is essential for XNA if the 'MESH' is included,
+ # but could be removed now?
fw('''
ObjectType: "Pose" {
Count: 1
@@ -3047,7 +3039,7 @@
return {'FINISHED'} # so the script wont run after we have batch exported.
# APPLICATION REQUIREMENTS
-# Please update the lists for UDK, Unity, XNA etc. on the following web page:
+# Please update the lists for UDK, Unity etc. on the following web page:
# http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Import-Export/UnifiedFBX
# NOTE TO Campbell -
More information about the Bf-extensions-cvs
mailing list