When I try to activate the translateOnDown attribute, it works on the left side. But on the right side is flipped
Looks like a bug?
When I try to activate the translateOnDown attribute, it works on the left side. But on the right side is flipped
Looks like a bug?
ouch.. that is a bug!
Will be fixed for next publish, in the meantime I’ll message you directly for temporary workaround
I have same problem with fingers and toe fingers when I try to mirror them from left side to right side. I was using the dog template
which kangaroo version are you using and which joints (names) are causing the issue?
Version 5.18
The joints that are not mirroring are: r_toeIndex, r_toeMiddle, r_toePinky, r_toeRing, r_toeThumb, r_index, r_middle, r_ring, r_pinky, r_thumb
thumbs were added and set as thumb on finger joint
I´m using the dog template and limbs are having the same issue when mirroring
You are right, they aren’t mirroring properly!
It’s only the down and the up is good, that’s why I haven’t seen it.
How familiar are you in python? Would you be able to take the fixed fingerBlendJoints() function from here to your body_v18.py file?
def fingerBlendJoints(sExcludeJointsWithStrings=[], dDefaultSettingValuesFingerBlendJoints={}):
'''
Very similar to the following limbBlendJoints() function, but more specific for fingers.
It basically does all the finger joints, except the ones you specify not to.
'''
sDefaultSettingAttrsFingerBlendJoints = []
utils.data.store('dDefaultSettingValuesFingerBlendJoints', dDefaultSettingValuesFingerBlendJoints)
sBlendJoints = []
for s, sSide in enumerate(['l','r']):
sJoints = [sJ for sJ in cmds.listRelatives('jnt_%s_armWrist' % sSide, ad=True, typ='joint')
if not sJ.endswith('END')
and not sJ.endswith('End')
and not sJ.endswith('Fingers')
and not sJ.endswith('Scale')
and cmds.listRelatives(sJ, p=False, c=True, typ='joint')]
for sJ in sJoints:
bSkip = False
for sExcludeString in sExcludeJointsWithStrings:
if sExcludeString in sJ:
bSkip = True
break
if bSkip:
continue
sBlendJ = '%sBlend' % sJ
if cmds.objExists(sBlendJ):
report.report.addLogText('Skipping "%s", because it already exists' % sBlendJ)
continue
cmds.createNode('joint', name=sBlendJ, p=sJ)
cmds.addAttr(sBlendJ, ln='isFingerBlendJoint')
cmds.setAttr('%s.t' % sBlendJ, 0, 0, 0)
sBlendJoints.append(sBlendJ)
xforms.matchRadius(sBlendJ, sJ, 1.5)
utils.addAttr(sBlendJ, ln='unrealBlendJoint', at='bool', defaultValue=True)
utils.addStringAttr(sBlendJ, 'blendFrom', sJ)
utils.addStringAttr(sBlendJ, 'blendTo', cmds.listRelatives(sJ, p=True, c=False)[0])
utils.addAttr(sBlendJ, ln='blendWeight', defaultValue=0.5)
sDownCtrlAngleAttr = utils.addAttr(sBlendJ, ln='downCtrlAngle', dv=-80, k=True)
sDownScaleAttr = utils.addAttr(sBlendJ, ln='scaleOnDown', min=0.001, dv=1, k=True)
sDownTranslationAttr = utils.addAttr(sBlendJ, ln='translateOnDown', dv=0, k=True)
sDownTranslationSided = nodes.createMultiplyNode(sDownTranslationAttr, -1.0) if sSide == 'r' else sDownTranslationAttr
sUpCtrlAngleAttr = utils.addAttr(sBlendJ, ln='upCtrlAngle', min=0, dv=80, k=True)
sUpScaleAttr = utils.addAttr(sBlendJ, ln='scaleOnUp', min=0.001, dv=1, k=True)
sUpTranslationAttr = utils.addAttr(sBlendJ, ln='translateOnUp', dv=0, k=True)
sUpTranslationSided = nodes.createMultiplyNode(sUpTranslationAttr, -1.0) if sSide == 'r' else sUpTranslationAttr
sHalfRotation = nodes.createVectorMultiplyNode('%s.r' % sJ, -0.5, bVectorByScalar=True, sName=sJ)
fStartAngle = cmds.getAttr('%s.rz' % sJ)
sDownCtrlAngleOffsetted = nodes.createAdditionNode([fStartAngle, sDownCtrlAngleAttr])
sDownOut = nodes.createRangeNode('%s.rz' % sJ, fStartAngle, sDownCtrlAngleOffsetted, 0, 1)
sUpCtrlAngleOffsetted = nodes.createAdditionNode([fStartAngle, sUpCtrlAngleAttr])
sUpOut = nodes.createRangeNode('%s.rz' % sJ, fStartAngle, sUpCtrlAngleOffsetted, 0, 1)
utils.addAttr(sBlendJ, ln='downOut', sConnect=sDownOut, k=True)
utils.addAttr(sBlendJ, ln='upOut', sConnect=sUpOut, k=True)
sTranslationY = nodes.createAdditionNode([nodes.createMultiplyNode(sDownOut, sDownTranslationSided),
nodes.createMultiplyNode(sUpOut, sUpTranslationSided)])
sScaleY = nodes.createMultiplyArrayNode([nodes.createRangeNode(sDownOut, 0, 1, 1, sDownScaleAttr),
nodes.createRangeNode(sUpOut, 0, 1, 1, sUpScaleAttr)])
sMatrix = nodes.createMultMatrixNode([nodes.createComposeMatrixNode([0, sTranslationY, 0]),
nodes.createComposeMatrixNode(xRotate=sHalfRotation, xScale=[1, sScaleY, 1])])
nodes.createDecomposeMatrix(sMatrix, sTargetPos='%s.t' % sBlendJ, sTargetRot='%s.r' % sBlendJ, sTargetScale='%s.s' % sBlendJ)
deformers.setCurrentAsReferencePose(sBlendJ)
sDefaultSettingAttrsFingerBlendJoints.append(sDownCtrlAngleAttr)
sDefaultSettingAttrsFingerBlendJoints.append(sDownTranslationAttr)
sDefaultSettingAttrsFingerBlendJoints.append(sDownScaleAttr)
sDefaultSettingAttrsFingerBlendJoints.append(sUpCtrlAngleAttr)
sDefaultSettingAttrsFingerBlendJoints.append(sUpTranslationAttr)
sDefaultSettingAttrsFingerBlendJoints.append(sUpScaleAttr)
for sAttr, fValue in dDefaultSettingValuesFingerBlendJoints.items():
if cmds.objExists(sAttr):
cmds.setAttr(sAttr, fValue)
utils.data.store('sDefaultSettingAttrsFingerBlendJoints', sDefaultSettingAttrsFingerBlendJoints)
You can also replace the whole file - but this might be a problem unless you switch to newest (5.19) version
I updated body_v18.py script, and I was able to manage the creation for fingers, but when I tested the right back fingers rotation, it is not correct like the left side. Meta and mid fingers are rotating awkward. These are examples when I use ToeCurl, ToeRoll and ToeSide attibutes
This is not the limbBlendJoints that are causing the issue here, right? Because I don’t see them in this image.
Judging from the image, I think your meta joints are rotating awkwardly, but it’s hard to guess why.
Can you send me the version folder in your _build folder? You can send it to me in a direct message here.
Ah - now I see what is happening. So it’s already in the dog template, the back toes.
The issue is that the blueprint skeleton is corrupt. The fix is this:
I’ll make sure this is fixed in the next kangaroo version