OSDN Git Service

fix converter shape_position
authorousttrue <ousttrue@gmail.com>
Fri, 14 Oct 2011 17:25:06 +0000 (02:25 +0900)
committerousttrue <ousttrue@gmail.com>
Fri, 14 Oct 2011 17:25:06 +0000 (02:25 +0900)
pymeshio/converter.py
pymeshio/pmx/__init__.py

index 373fe39..66f4ecf 100644 (file)
@@ -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,
index 2cd954a..e367e46 100644 (file)
@@ -694,7 +694,7 @@ class RigidBody(Diff):
         self._diff(rhs, 'no_collision_group')\r
         self._diff(rhs, 'shape_type')\r
         self._diff(rhs, 'shape_size')\r
-        #self._diff(rhs, 'shape_position')\r
+        self._diff(rhs, 'shape_position')\r
         self._diff(rhs, 'shape_rotation')\r
         self._diff(rhs, 'param')\r
         self._diff(rhs, 'mode')\r