File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ def __countBoneDepth(cls, bone):
198198
199199 def __exportBones (self ):
200200 """ Export bones.
201- @return the dictionary to map Blender bone names to bone indices of the pmx.model instance.
201+ Returns:
202+ A dictionary to map Blender bone names to bone indices of the pmx.model instance.
202203 """
203204 arm = self .__armature
204205 boneMap = {}
@@ -250,7 +251,12 @@ def __exportBones(self):
250251 pmx_bones .append (pmx_tip_bone )
251252 pmx_bone .displayConnection = pmx_tip_bone
252253 elif len (bone .children ) > 0 :
253- pmx_bone .displayConnection = list (filter (lambda x : not pose_bones [x .name ].is_mmd_shadow_bone , sorted (bone .children , key = lambda x : 1 if pose_bones [x .name ].mmd_bone .is_tip else 0 )))[0 ]
254+ for child in bone .children :
255+ if child .use_connect :
256+ pmx_bone .displayConnection = child
257+ if not pmx_bone .displayConnection :
258+ pmx_bone .displayConnection = bone .tail - bone .head
259+
254260
255261 for i in pmx_bones :
256262 if i .parent is not None :
You can’t perform that action at this time.
0 commit comments