Skip to content

Commit

Permalink
Merge pull request #8412 from phfatmonkey/Blender-Exporter-Skinned-Me…
Browse files Browse the repository at this point in the history
…sh-Fix

Blender exporter skinned mesh fix
  • Loading branch information
mrdoob committed Mar 19, 2016
2 parents f58b2b6 + ff05427 commit 5c7290a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions utils/exporters/blender/addons/io_three/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,7 @@ def animation_options():
"""
anim = [
(constants.OFF, constants.OFF.title(), constants.OFF),
(constants.POSE, constants.POSE.title(), constants.POSE),
(constants.REST, constants.REST.title(), constants.REST)
(constants.POSE, constants.POSE.title(), constants.POSE)
]

return anim
Expand Down Expand Up @@ -727,7 +726,7 @@ class ExportThree(bpy.types.Operator, ExportHelper):

option_animation_skeletal = EnumProperty(
name="",
description="Export animation (skeletal)",
description="Export animation (skeletal) NOTE: Mesh must be in bind pose",
items=animation_options(),
default=constants.OFF)

Expand Down
4 changes: 2 additions & 2 deletions utils/exporters/blender/addons/io_three/exporter/api/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,8 @@ def vertices(mesh):
vertices_ = []

for vertex in mesh.vertices:
vertices_.extend((vertex.co.x, vertex.co.y, vertex.co.z))

vertices_.extend((vertex.co.x, vertex.co.z, -vertex.co.y))
return vertices_


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ def animated_xform(obj, options):
track_loc = track_loc[0]
use_inverted = options.get(constants.HIERARCHY, False) and obj.parent

if times == None:
logger.info("In animated xform: Unable to extract trackable fields from %s", objName)
return tracks

# for each frame
inverted_fallback = mathutils.Matrix() if use_inverted else None
convert_matrix = AXIS_CONVERSION # matrix to convert the exported matrix
Expand Down Expand Up @@ -374,7 +378,7 @@ def matrix(obj, options):
parent_inverted = obj.parent.matrix_world.inverted(mathutils.Matrix())
return parent_inverted * obj.matrix_world
else:
return AXIS_CONVERSION * obj.matrix_world
return obj.matrix_world


@_object
Expand Down

0 comments on commit 5c7290a

Please sign in to comment.