i reach to good result for this
but this mel code create a camera that all keyable attributes have key,
also some attributes like Focal Length, F Stop and others have key too.
do you want the code apply on keyable attrs or all?

On Fri, Apr 17, 2015 at 3:56 AM, f.michal <[email protected]> wrote:

>  As trivial as that MEL:
>
> camera;
> // Result: camera1 //
> bakeResults -simulation true -t "1:24" -sampleBy 1 -disableImplicitControl
> true -preserveOutsideKeys true -sparseAnimCurveBake false
> -removeBakedAttributeFromLayer false -removeBakedAnimFromLayer false
> -bakeOnOverrideLayer false -minimizeRotation true -controlPoints false
> -shape true {"camera1"};
> // Result: 18 //
>
>
> W dniu 2015-04-17 o 12:37, Mahmoodreza Aarabi pisze:
>
> can you share a simple scene that have the problem?
>
> On Fri, Apr 17, 2015 at 3:13 AM, f.michal <[email protected]> wrote:
>
>>  Thanks !
>> But static channals are also those who have many keys all with the same
>> values - which is my case.
>> Bigger picture: I'm trying to determine if camera moves or not in a shot.
>> If it's static there's a potential advantage in render frame range on
>> some passes.
>>
>> W dniu 2015-04-17 o 12:07, Mahmoodreza Aarabi pisze:
>>
>>  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
>> ​
>>
>>
>>  --
>> 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/5530DCE7.7010001%40gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/5530DCE7.7010001%40gmail.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/CADvbQw%2BAi%3DdpEy5M6pnUGyHFtET%3DtsZiryZG43F1Q0f16Wz8GA%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CADvbQw%2BAi%3DdpEy5M6pnUGyHFtET%3DtsZiryZG43F1Q0f16Wz8GA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> 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/5530E6C0.7050704%40gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/5530E6C0.7050704%40gmail.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/CADvbQwJrLvkEn-sHcbpbhowXExuB%3Dr%3DOFE5zhRSEMvEZWgnU5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to