ttpetra Posted February 2, 2022 Share Posted February 2, 2022 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 zBox.setKeyframes(keys) ^ SyntaxError: invalid syntax >>> Quote Link to comment Share on other sites More sharing options...
Atom Posted February 2, 2022 Share Posted February 2, 2022 You have a typo. Python variables are case sensitive. zbox is not the same as zBox. Quote Link to comment Share on other sites More sharing options...
ttpetra Posted February 2, 2022 Author Share Posted February 2, 2022 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.