Jump to content

keyframing python


Recommended Posts

I am learning python in Houdini, can anyone help with the reason for this error.

I want to set multiple keyframes for the 'tz' parm of a geo in houdini


>>> zBox = box.parm('tz')
>>> zBox.keyframes()
>>> keys = zbox.keyframes()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
NameError: name 'zbox' is not defined
>>> keys = zBox.keyframes()
>>> for key in keys:
...     key.setFrame(key.frame()+1)
...     key.setValue(key.frame()+2)
... zBox.setKeyframes(keys)
  File "<console>", line 4
SyntaxError: invalid syntax

Link to comment
Share on other sites

47 minutes ago, Atom said:

You have a typo. Python variables are case sensitive. zbox is not the same as zBox.

Thanks. it returned (not defined with the typo error), i have fixed that but it returned a syntax error. something else must be wrong with it.

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.

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...