From f682265b84fc3ac5abe7b4f6d9256e3123ef5828 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sat, 15 Oct 2011 02:25:06 +0900 Subject: [PATCH] fix converter shape_position --- pymeshio/converter.py | 3 ++- pymeshio/pmx/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pymeshio/converter.py b/pymeshio/converter.py index 373fe39..66f4ecf 100644 --- a/pymeshio/converter.py +++ b/pymeshio/converter.py @@ -298,7 +298,8 @@ def pmd_to_pmx(src): no_collision_group=r.no_collision_group, shape_type=r.shape_type, shape_size=r.shape_size, - shape_position=r.shape_position, + shape_position=(r.shape_position+src.bones[0].pos if r.bone_index==-1 + else r.shape_position+src.bones[r.bone_index].pos), shape_rotation=r.shape_rotation, mass=r.mass, linear_damping=r.linear_damping, diff --git a/pymeshio/pmx/__init__.py b/pymeshio/pmx/__init__.py index 2cd954a..e367e46 100644 --- a/pymeshio/pmx/__init__.py +++ b/pymeshio/pmx/__init__.py @@ -694,7 +694,7 @@ class RigidBody(Diff): self._diff(rhs, 'no_collision_group') self._diff(rhs, 'shape_type') self._diff(rhs, 'shape_size') - #self._diff(rhs, 'shape_position') + self._diff(rhs, 'shape_position') self._diff(rhs, 'shape_rotation') self._diff(rhs, 'param') self._diff(rhs, 'mode') -- 2.11.0