Ok, so I have the objects needing the condition to filter proper rotations.
Let’s start here.
when the control(lf_footBanking_ctrl) does:
1)rotates in the positive Z, with a maximum of 60. then the lf_inner_rev will rotate positive Z, with a maximum of 60.
2)rotates in the negative Z, with a maximum of -60, then the lf_outer_rev will rotate negative Z, with a maximum of -60.
Pretty simple logic, but I’m unfamiliar the condition node, but I do wish to learn this. I read the autodesk how to documents, and I’m afraid I couldn’t quite grasp what it was saying :).
Any help would be greatly appreciated. just point me in the right direction :).
Thanks!
I would take a much simpler approach to this using direct connections and transform limitations. Basically, directly connect the rotateZ from your controller into the rotateZ of each rotation group and then limit the rotate information of the rotate groups so they stay within the range you have specified. Here’s a Python script that will set it up (run it in a Python tab of the Script Editor in Maya):
import maya.cmds as cmds
cmds.connectAttr('lf_footBanking_ctrl.rz', 'lf_outer_rev.rz')
cmds.transformLimits('lf_outer_rev', rz=[-60,0], erz=[1,1])
cmds.connectAttr('lf_footBanking_ctrl.rz', 'lf_inner_rev.rz')
cmds.transformLimits('lf_inner_rev', rz=[0,60], erz=[1,1])
If you are dead-set on using condition nodes, try the following Python script. It will create a condition node per rotation group for rotations greater than and less than 0. In the end, this setup is essentially the same as above but just unnecessarily complicated.
import maya.cmds as cmds
for x,y in [['lf_inner_rev', 2], ['lf_outer_rev', 4]]:
cnd = cmds.createNode('condition', name=x+'_cnd')
cmds.setAttr(cnd+'.secondTerm', 0)
cmds.setAttr(cnd+'.operation', y)
cmds.setAttr(cnd+'.colorIfFalse', 0,0,0)
cmds.connectAttr('lf_footBanking_ctrl.rz', cnd+'.firstTerm')
cmds.connectAttr('lf_footBanking_ctrl.rz', cnd+'.colorIfTrueB')
cmds.connectAttr(cnd+'.outColorB', x+'.rz')