If I remember my math correctly the curve should always be flat when the
derivative is 0? If the value is constantly increasing, the derivative
would always be a positive number. Checking for the delta in Y-position is
the same thing as finding the derivative, isn't it?

Cheers,
Elias Ericsson Rydberg

2016-03-04 13:45 GMT+01:00 Ben Dickson <[email protected]>:

> In a Python script you could just loop over each knob's .animation()
> curves, check if all the .y values are the same - if so, clear the
> animation and replace it with a static value. I think checking for zero
> derivative is incorrect, as that could still require keyframes (i.e a
> constantly increasing value - different to a constant value but would have
> same derivative)
>
> On 04/03/16 23:07, Elias Ericsson Rydberg wrote:
>
>> Maybe you could loop through each animation curve and check it the
>> derivative of said curve is anything different than 0 then it shouldn't
>> be marked for deletion (or all values except for frame is deleted).
>> Haven't tried it myself, but that's one method.
>>
>> Cheers,
>> Elias Ericsson Rydberg
>>
>> fredag 4 mars 2016 skrev Darren Coombes <[email protected]
>> <mailto:[email protected]>>:
>>
>>     Anyone know how you'd write a menu item to remove all flat animation
>>     curves from a camera for example??
>>
>>     This way, only curves that are animated show up in curve editor?
>>
>>     *
>>     *Thanks.*
>>     *Darren Coombes*
>>     **
>>     *
>>     *
>>     *Check out some of my work...*
>>     *
>>     *
>>     *www.vimeo.com/darrencoombes <http://www.vimeo.com/darrencoombes>*
>>     *
>>     *
>>     *
>>     *
>>     *
>>     *
>>     *Mob: +61 418 631 079 <tel:+61%20418%20631%20079>*
>>     *
>>     *
>>     *Skype:  darrencoombes*
>>     *Twitter:  @durwood81*
>>     *
>>
>>
>>
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>>
> --
> ben dickson
> 2D TD | [email protected]
> rising sun pictures | www.rsp.com.au
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to