[Sidefx-houdini-list] general way of asking if a channel is animated?
edward at sidefx.com
Thu Sep 2 10:14:39 EDT 2010
On 9/2/2010 9:59 AM, Graham Thompson wrote:
> I think still think best way is to use keyframes(). If you need to
> check against CHOPs overrides as well then you can also use
> def isParmDriven(parm):
> """ Test to see if a parameter is driven by an animation channel,
> expression or CHOP override. """
> return parm.keyframes() or parm.overrideTrack()
> Than function returns true in the case there is an expression,
> animation or a CHOP is exporting to the channel.
I second this approach one wishes to know if a parm is "driven". This is
distinctly different from what "isTimeDependent" means. As Pablo pointed
out, "isTimeDependent" returns true if the given parameter might
evaluate to a different value when time changes. If a parameter returns
a constant value for all possible values of time, then it does NOT
depend on time.
ASIDE: Houdini uses the concept of "time dependency" to determine if a
node requires recooking when time changes. If a node is determined to
NOT be time dependent, then the cooking engine is free to make
optimizations by reusing cached data. However, since this concept is
used for optimizations, it might err on the conservative side so that no
stale data is used. ie. if time dependency cannot be definitely
determined, isTimeDependent() will return True.
More information about the Sidefx-houdini-list