Skip to content

Commit

Permalink
bone mapping panels: fixed lost attribute names;
Browse files Browse the repository at this point in the history
  • Loading branch information
mechanic committed Mar 28, 2024
1 parent 397a251 commit 5d170ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions preset_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,15 @@ def reset_preset_names(settings):
settings.right_arm.name = 'arm'
settings.left_arm.name = 'arm'

settings.right_arm_ik.name = 'arm'
settings.left_arm_ik.name = 'arm'

settings.right_leg.name = 'leg'
settings.left_leg.name = 'leg'

settings.right_leg_ik.name = 'leg'
settings.left_leg_ik.name = 'leg'

settings.right_fingers.name = 'fingers'
settings.left_fingers.name = 'fingers'

Expand Down
12 changes: 11 additions & 1 deletion ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ class AddPresetArmatureRetarget(AddPresetBase, Operator):
class ClearArmatureRetarget(Operator):
bl_idname = "object.expy_kit_armature_clear"
bl_label = "Clear Retarget Settings"
bl_options = {'REGISTER', 'UNDO'}

@classmethod
def poll(cls, context):
Expand Down Expand Up @@ -421,6 +422,7 @@ def execute(self, context):

skeleton.root = ''
skeleton.deform_preset = '--'
preset_handler.reset_preset_names(skeleton)

return {'FINISHED'}

Expand Down Expand Up @@ -760,11 +762,19 @@ def draw(self, context):
ob = context.object
layout = self.layout

row = layout.row()
row.prop(ob.data, "expykit_twist_on", text="Display palm bones")

skeleton = ob.data.expykit_retarget

sides = "right", "left"
split = layout_split(layout)
finger_bones = ('a', 'b', 'c')

if ob.data.expykit_twist_on:
finger_bones = ('a', 'b', 'c', 'meta')
else:
finger_bones = ('a', 'b', 'c')

fingers = ('thumb', 'index', 'middle', 'ring', 'pinky')
m_props = []
for side, group in zip(sides, [skeleton.right_fingers, skeleton.left_fingers]):
Expand Down

0 comments on commit 5d170ea

Please sign in to comment.