Jump to content

Why does using python expressions require creating a keyframe?


Recommended Posts

Hscript expressions immediately work but anytime I use python for expressions, it doesn't start working until I create a keyframe on that parameter.

Any ideas why it's like this? Or is it because hscript does this automatically? If so, then why isn't python made to do the same?

Link to comment
Share on other sites

I have never created any keyframes for python expressions. Must be something strange going on.

The keyframe thing is only for some parameter types like strings, paths, etc. I don't know why this is required but I'm sure a developer would have a good reason why this is the case but once you know the trick its not an issue.

  • Like 1
Link to comment
Share on other sites

The keyframe thing is only for some parameter types like strings, paths, etc. I don't know why this is required but I'm sure a developer would have a good reason why this is the case but once you know the trick its not an issue.

That is so strange but true. I rarely modify strings in Houdini. Now I also want an explanation to why it is like this :)

  • Like 1
Link to comment
Share on other sites

Shouldn't it be just like hscript expressions?

cubic() is a string.

`cubic()` is an expression.

If hscript can do it, why not python?

Am I missing something? :)

Backticks wouldnt make sense in a python fashion imo cause then how would you combine both the expression and the string.

`cubic()` cubic() would break all python logic but

cubic() + ' cubic()' would make sense

Link to comment
Share on other sites

it may be simply difficult to guess for houdini whether you are writing text or expression since you are in text mode by default

creating keyframe for Python expression in string parms is fine for me

actually you don't have to do it if you use Alt-E in expression mode to create the expression, it will be done for you as if you directly just written expression without setting any keyframe before

and if you imagine that normal expressions are keyframes anyway, it is not that surprising on the other hand it has its own strengths, since you can limit expressions between keyframes

  • Like 1
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...