Guest xionmark Posted April 18, 2006 Share Posted April 18, 2006 Hi, I have dozens of noise nodes that I need to change the values of the noise for but want to use a variable instead of hard coding the values and also use hscript to set them (instead of doing it manually). Essentially I want to do something like this: opparm subnet1/noise4d1 amp ($noise_x $noise_y $noise_z) But of course the variable value gets evaluated in this form but I want to insert the string (i.e. "$noise_x") into the fields but can't figure out the correct syntax. I've tried various forms using single and double qoutes, no luck. Any suggestions? Thanks! --Mark Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted April 18, 2006 Share Posted April 18, 2006 Hey Mark, If you want the parameter to be an expression or function then you'll need a channel. So I think you may want to try something like this: chadd -t 0 0 my_op ampx ampy ampz chkey -t 0 -v 0 -m 0 -A 0 -F '$noise_x' my_op/ampx chkey -t 0 -v 0 -m 0 -A 0 -F '$noise_y' my_op/ampy chkey -t 0 -v 0 -m 0 -A 0 -F '$noise_z' my_op/ampz opparm my_op amp ( ampx ampy ampz ) ... or similar... you get the idea. Cheers. Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 18, 2006 Share Posted April 18, 2006 If you want the parameter to be an expression or function then you'll need a channel. So I think you may want to try something like this: chadd -t 0 0 my_op ampx ampy ampz chkey -t 0 -v 0 -m 0 -A 0 -F '$noise_x' my_op/ampx chkey -t 0 -v 0 -m 0 -A 0 -F '$noise_y' my_op/ampy chkey -t 0 -v 0 -m 0 -A 0 -F '$noise_z' my_op/ampz opparm my_op amp ( ampx ampy ampz ) ... or similar... you get the idea. Cheers. 26627[/snapback] Hi Mario! Gosh, I thought I had done something exactly like that, will try again soon, got meetings to go to. Thanks for the tip, I'm sure I missed something very obvious, will check again. --Mark Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 19, 2006 Share Posted April 19, 2006 Hey there Mario, Your tip worked great. For some reason the channel wasn't being created, I brought up a new Houdini session and then it all worked OK. Weird. I didn't get the syntax correct initially but even after trying your suggestion channels were created. After restarting Houdini channels were created, parms being assigned, it's all groovy again. Take care! --Mark Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 25, 2006 Share Posted April 25, 2006 Very odd. I have this same problem (not being able to create channels from hscript) happening again, not sure why, seems very random and hard to reproduce. Perhaps upgrading to H8.0.474 wil help? Currently at H8.0.383. Anyone else ever have problems creating channels from hscript? This is all being done in DOPs, not that it should matter, but you never know I guess. --Mark Quote Link to comment Share on other sites More sharing options...
thekenny Posted April 25, 2006 Share Posted April 25, 2006 i was helping someone do this before and the biggest problem was making sure that you had a key on the frame. i know it sounds obvious.. but it is the small things -k Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted April 25, 2006 Share Posted April 25, 2006 i was helping someone do this before and the biggest problem was making sure that you had a key on the frame.i know it sounds obvious.. but it is the small things -k 26884[/snapback] Good point. I was working rather quickly and could have very likely missed that. Thanks! --Mark 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.