Euler curve filer is not working for objects in animation layer

16 views
Skip to first unread message

likage

unread,
Oct 17, 2019, 6:54:46 PM10/17/19
to Python Programming for Autodesk Maya
Hi everyone, I have trouble in doing euler-filtering in a pythonic if the object channels is stemming from an animation layer (where the channels are in 'greenish-blue' instead of the red.

I tried the following:
sel = '|man_rig|hands|right_arm|right_hand_ctrl'
channels = ["translate", "rotate"]
axes = ["X", "Y", "Z"]
for channel in channels:
    for axis in axes:
        attribute = "{0}.{1}{2}".format(sel, channel, axis)
        in_conn = cmds.listConnections(
            attribute,
            source=True,
            plugs=True
        )
        cmds.filterCurve(in_conn, filter="euler")

The above code works if my object is not in animation layer(s).

When I enable 'echo all commands' in the Script Editor, it echoes out a long line, something as follows:
.._myAnimLayer_inputB .._myAnimLayer_inputA

How do I derive these inputA, inputB? Or if there is a better way to euler filter for objects whose channels are in animation layer?
Reply all
Reply to author
Forward
0 new messages