magneto Posted April 13, 2012 Share Posted April 13, 2012 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? Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 13, 2012 Share Posted April 13, 2012 I have never created any keyframes for python expressions. Must be something strange going on. Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted April 13, 2012 Share Posted April 13, 2012 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. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 13, 2012 Author Share Posted April 13, 2012 Sorry yes it was strings, paths like Luke said. I don't use python expressions as often but this is mostly what I encountered. Would still be good to know the reason though Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 13, 2012 Share Posted April 13, 2012 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 1 Quote Link to comment Share on other sites More sharing options...
edward Posted April 13, 2012 Share Posted April 13, 2012 So you go to type in cubic(), is that an expression or the actual string value? Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 13, 2012 Share Posted April 13, 2012 So you go to type in cubic(), is that an expression or the actual string value? I think it would make sense to then type 'cubic()' if you actually wanted it as a string value and not an expression. Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted April 13, 2012 Share Posted April 13, 2012 I think it would make sense to then type 'cubic()' if you actually wanted it as a string value and not an expression. But why would you require users to put strings in quotes... in a string field. Just saying. Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 13, 2012 Share Posted April 13, 2012 But why would you require users to put strings in quotes... in a string field. Just saying. True, but it is how you make strings when actually coding python so it kinda makes sense but i still get your point. Quote Link to comment Share on other sites More sharing options...
magneto Posted April 13, 2012 Author Share Posted April 13, 2012 (edited) 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? Edited April 13, 2012 by magneto Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 13, 2012 Share Posted April 13, 2012 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 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 13, 2012 Author Share Posted April 13, 2012 What about ~ then? That would work nicely ~cubic()~ 1 Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted April 13, 2012 Share Posted April 13, 2012 What about ~ then? That would work nicely ~cubic()~ 1 1 Quote Link to comment Share on other sites More sharing options...
anim Posted April 14, 2012 Share Posted April 14, 2012 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 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted April 14, 2012 Author Share Posted April 14, 2012 Thanks anim for the Alt+E trick for Python expressions. I only use it for long expressions but with Python it makes more sense to use 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.