magneto Posted February 20, 2014 Share Posted February 20, 2014 Hi, I am adding a parameter to an existing op so it's not gonna be a new op, and I want to write a multi-line Python script inside the Callback Script parameter. But when I do so, and save, Houdini just makes them 1 big line with spaces in between lines, which obviously doesn't work. Since there is no place for me to store a script, if I am not wrong, I need to write it here. Thanks Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted February 20, 2014 Share Posted February 20, 2014 script , script Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted February 20, 2014 Share Posted February 20, 2014 ... or just call function from hdaModule that will execute separate tasks. Quote Link to comment Share on other sites More sharing options...
graham Posted February 20, 2014 Share Posted February 20, 2014 If the parameter is a one off then in this situation I would stick the code in hou.session since it just has to be among for the ride in the hip file. If it's more of a preset type of thing then it's probably easier to just shove in a module somewhere. You can easily have simple multiple python statements on a single line (separated by ; ) but trying to do more advanced things breaks quickly. 1 Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted February 20, 2014 Share Posted February 20, 2014 ...(separated by ; )... Oh yeah, it was semicolon . But the comma works too, just that it would be good to have confirmation from SESI that it's not a bug Anyway, if you forget what is used as a separator for "multiple statements in one line", you can refer to this table in wikipedia. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted February 20, 2014 Author Share Posted February 20, 2014 Thanks guys, yeah I need this for a preset. Would I be able to use at least a tab character? I just have a 1 line loop, and 3 lines total 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.