Skip to content

Commit add38f3

Browse files
committed
Postpone twist trick of the first finger bone to DEF bones.
I.e. make ORG bones follow the user-specified rotation fully, so that IK constraint sees it as-is too.
1 parent d928cee commit add38f3

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

rigs/limbs/super_finger.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def generate(self):
148148
def_bone_e.parent = eb[self.org_bones[i]].parent
149149
def_bone_e.use_connect = False
150150
# First mch bone
151-
mch_bone_e.parent = eb[self.org_bones[i]].parent
151+
mch_bone_e.parent = ctrl_bone_e
152152
mch_bone_e.use_connect = False
153153
# First mch driver bone
154154
mch_bone_drv_e.parent = eb[self.org_bones[i]].parent
@@ -196,30 +196,30 @@ def generate(self):
196196
con.subtarget = mch
197197

198198
# Constraining the deform bones
199-
con = pb[deform].constraints.new('COPY_TRANSFORMS')
200-
con.target = self.obj
201-
con.subtarget = org
202-
203-
# Constraining the mch bones
204-
if mch_chain.index(mch) == 0:
205-
con = pb[mch].constraints.new('COPY_LOCATION')
199+
if deform == def_chain[0]:
200+
con = pb[deform].constraints.new('COPY_LOCATION')
206201
con.target = self.obj
207-
con.subtarget = ctrl
202+
con.subtarget = org
208203

209-
con = pb[mch].constraints.new('COPY_SCALE')
204+
con = pb[deform].constraints.new('COPY_SCALE')
210205
con.target = self.obj
211-
con.subtarget = ctrl
206+
con.subtarget = org
212207

213-
con = pb[mch].constraints.new('DAMPED_TRACK')
208+
con = pb[deform].constraints.new('DAMPED_TRACK')
214209
con.target = self.obj
215-
con.subtarget = ctrl_chain[ctrl_chain.index(ctrl)+1]
210+
con.subtarget = org_bones[1]
216211

217-
con = pb[mch].constraints.new('STRETCH_TO')
212+
con = pb[deform].constraints.new('STRETCH_TO')
218213
con.target = self.obj
219-
con.subtarget = ctrl_chain[ctrl_chain.index(ctrl)+1]
214+
con.subtarget = org_bones[1]
220215
con.volume = 'NO_VOLUME'
216+
else:
217+
con = pb[deform].constraints.new('COPY_TRANSFORMS')
218+
con.target = self.obj
219+
con.subtarget = org
221220

222-
elif mch_chain.index(mch) == len(mch_chain) - 1:
221+
# Constraining the mch bones
222+
if mch_chain.index(mch) == len(mch_chain) - 1:
223223
con = pb[mch].constraints.new('DAMPED_TRACK')
224224
con.target = self.obj
225225
con.subtarget = tip_name

0 commit comments

Comments
 (0)