hi, 

I'm driving an ik spline twist with a ramp, which usually works fine 
(..ish). But recently, I've been trying to drive my twist with 2 ramps, 
merged into a layeredTexture. And for some odd reasons, it seems that maya 
doesn't understand it (no error, the layeredTexture simply doesn't affect 
the ik spline twist at all). Did anyone try this before ? Any reason why it 
doesn't work ? looks like the datas are of the same type (rgb color), so 
I'm wondering why it is not working. I suspect some weird override from 
autodesk for this mechanism... also, I'm not sure how maya "maps" the u and 
v informations on the curve, since it's not necessarily normalized.

Here is a quick snippet if you want to test it yourself : 
# scene setup
parent = None
jts = []
for i in range(10):
    jt = cmds.createNode('joint', ss=1, p=parent)
    cmds.setAttr(jt + '.tx', 1)
    cmds.setAttr(jt + '.displayLocalAxis', 1)
    parent = jt
    jts.append(jt)
ikh, _, _ = cmds.ikHandle(sj=jts[0], ee=jts[-1], solver='ikSplineSolver')
cmds.setAttr(ikh + '.dTwistControlEnable', 1)
cmds.setAttr(ikh + '.dTwistValueType', 2)  # ramp
rmp = cmds.createNode('ramp', ss=1)
cmds.connectAttr(rmp + '.outColor', ikh + '.dTwistRamp')
cmds.select(rmp, r=1)
# ------ so far, it's working : moving the ramp attribute will affect the 
twist
layers = cmds.createNode('layeredTexture', ss=1)
cmds.connectAttr(rmp + '.outColor', layers + '.inputs[0].color')
cmds.connectAttr(layers + '.outColor', ikh + '.dTwistRamp', f=True)
# ------ this no longer works

Any idea on what is going on here ?
Thanks =]

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/6e325d69-d4a8-41f4-a308-5a53b9eef921%40googlegroups.com.

Reply via email to