Hello
Static Channels are related to when you set a single keyframe on an object
when you want to delete it you can do it with the menu you want.but if you
want to detect a static channel on an animation curve of an object you can
use this code:
from maya import cmds
sels = cmds.ls(sl=True)
keyCount = 0for each in sels:
attrs = cmds.listAttr(each, k=True)
for at in attrs:
keyCount = cmds.keyframe((each + '.' + at), q=True, kc=True)
if keyCount == 1:
tempValue = cmds.getAttr(each + '.' + at)
cmds.cutKey((each + '.' + at), cl=True)
cmds.setAttr((each + '.' + at), tempValue)
main snippet is this keyCount = cmds.keyframe('object.attr', q=True,
kc=True) that return count of your keyframes on an object.
good luck
On Fri, Apr 17, 2015 at 2:29 AM, Michał Frątczak <[email protected]> wrote:
> Hello
> Maya has an option to delete static curves from transfrormation channels
> (edit > delete by type > static channels).
> Is there any method to check if they're static without deleting anything ?
>
>
> --
> 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/f8ad0153-0b12-4878-a117-7d8ab95be25a%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/f8ad0153-0b12-4878-a117-7d8ab95be25a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Bests,
madoodia
--
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/CADvbQwLGAFPFBFNttApt%3DqOo7xNOg1XzXrs8my73Oze6YwDcsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.