Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
87ff389b
Commit
87ff389b
authored
11 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
remove XNA hacks
parent
c5639d0a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
io_scene_fbx/__init__.py
+0
-7
0 additions, 7 deletions
io_scene_fbx/__init__.py
io_scene_fbx/export_fbx.py
+3
-11
3 additions, 11 deletions
io_scene_fbx/export_fbx.py
with
3 additions
and
18 deletions
io_scene_fbx/__init__.py
+
0
−
7
View file @
87ff389b
...
@@ -197,8 +197,6 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
...
@@ -197,8 +197,6 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
use_mesh_edges
=
BoolProperty
(
use_mesh_edges
=
BoolProperty
(
name
=
"
Include Edges
"
,
name
=
"
Include Edges
"
,
description
=
(
"
Edges may not be necessary, can cause import
"
"
pipeline errors with XNA
"
),
default
=
False
,
default
=
False
,
)
)
use_armature_deform_only
=
BoolProperty
(
use_armature_deform_only
=
BoolProperty
(
...
@@ -238,11 +236,6 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
...
@@ -238,11 +236,6 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
default
=
6.0
,
default
=
6.0
,
)
)
path_mode
=
path_reference_mode
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
(
batch_mode
=
EnumProperty
(
name
=
"
Batch Mode
"
,
name
=
"
Batch Mode
"
,
items
=
((
'
OFF
'
,
"
Off
"
,
"
Active scene to file
"
),
items
=
((
'
OFF
'
,
"
Off
"
,
"
Active scene to file
"
),
...
...
This diff is collapsed.
Click to expand it.
io_scene_fbx/export_fbx.py
+
3
−
11
View file @
87ff389b
...
@@ -223,7 +223,6 @@ def save_single(operator, scene, filepath="",
...
@@ -223,7 +223,6 @@ def save_single(operator, scene, filepath="",
use_metadata
=
True
,
use_metadata
=
True
,
path_mode
=
'
AUTO
'
,
path_mode
=
'
AUTO
'
,
use_mesh_edges
=
True
,
use_mesh_edges
=
True
,
use_rotate_workaround
=
False
,
use_default_take
=
True
,
use_default_take
=
True
,
):
):
...
@@ -233,10 +232,6 @@ def save_single(operator, scene, filepath="",
...
@@ -233,10 +232,6 @@ def save_single(operator, scene, filepath="",
mtx_x90
=
Matrix
.
Rotation
(
math
.
pi
/
2.0
,
3
,
'
X
'
)
mtx_x90
=
Matrix
.
Rotation
(
math
.
pi
/
2.0
,
3
,
'
X
'
)
# Used for mesh and armature rotations
# Used for mesh and armature rotations
mtx4_z90
=
Matrix
.
Rotation
(
math
.
pi
/
2.0
,
4
,
'
Z
'
)
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
:
if
global_matrix
is
None
:
global_matrix
=
Matrix
()
global_matrix
=
Matrix
()
...
@@ -485,10 +480,6 @@ def save_single(operator, scene, filepath="",
...
@@ -485,10 +480,6 @@ def save_single(operator, scene, filepath="",
rot
=
tuple
(
rot
.
to_euler
())
# quat -> euler
rot
=
tuple
(
rot
.
to_euler
())
# quat -> euler
scale
=
tuple
(
scale
)
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
:
else
:
# This is bad because we need the parent relative matrix from the fbx parent (if we have one), dont use anymore
# 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
#if ob and not matrix: matrix = ob.matrix_world * global_matrix
...
@@ -2291,7 +2282,8 @@ Definitions: {
...
@@ -2291,7 +2282,8 @@ Definitions: {
}
'''
%
tmp
)
}
'''
%
tmp
)
del
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
(
'''
fw
(
'''
ObjectType:
"
Pose
"
{
ObjectType:
"
Pose
"
{
Count: 1
Count: 1
...
@@ -3047,7 +3039,7 @@ def save(operator, context,
...
@@ -3047,7 +3039,7 @@ def save(operator, context,
return
{
'
FINISHED
'
}
# so the script wont run after we have batch exported.
return
{
'
FINISHED
'
}
# so the script wont run after we have batch exported.
# APPLICATION REQUIREMENTS
# 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
# http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Import-Export/UnifiedFBX
# NOTE TO Campbell -
# NOTE TO Campbell -
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment