Jump to content

CHOPs counter: add values from past keyframes


guache

Recommended Posts

I have an animation channel with keyframes with various integer values. In CHOPs, I'd like to have a rolling counter that holds the sum of values on all preceding keyframes (values from keyframes only, not values from all preceding frames). Any idea how to do this? Below is a sample of what the counter would do:

Keyframe on frame 1: value 3, counter: 3 (3)

Keyframe on frame 8: value 8, counter: 11 (i.e 3+8)

Keyframe on frame 13: value 4, counter:15 (i.e 3+8+4)

Keyframe on frame 23: value 4, counter:19 (i.e 3+8+4+4)

Keyframe on frame 29: value 7, counter: 26 (i.e 3+8+4+4+7)

Edited by guache
Link to comment
Share on other sites

The Area CHOP doesn't care about keyframes. You can wrangle almost anything, also with the "if" statement, but you probably don't have the list of keyframes? Probably Python iteration is needed here?

http://www.sidefx.com/docs/houdini/hom/hou/Parm

hou.Parm.keyframes() → tuple of hou.BaseKeyframe

Returns the keyframes on this parameter.
Edited by ikoon
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...