I try to start writening a script to speed up work in Houdini and I struggle with it at the very begingn. As it is shown on my screenshot, for start I wanted to reset values of my parameters to value of 0. But i get error shown on seceond screenshot. My goal is to write few scripts that will help me to reset parameters of specific parts of the body.
The result of your comparison “node == 0” might be True or False, but you are not doing anything with that information - so what do you expect it to do? What you ARE doing is: you are reading out a value from the node's parameter “spine_squat_front”. Then you are comparing that read out value to 0, done. There is no “functionality” in your function.
Marc
--- Out of here. Being called a dick after having supported Houdini users for years is over my paygrade. I will work for money, but NOT for "you have to provide people with free products" Indie-artists. Good bye. https://www.marc-albrecht.de [www.marc-albrecht.de]
Thanks for Yur reply. I see my mistake with ( == ) changed it to ( = ) still doesn't work. What i want to do is to read out value of parameter in this case “spine_squat_front” and change it (reset) to value of 0. The goal is to write scripts that can reset many(specific) parameters at once.
My apologies - that's not how Python or Houdini work. If you assign a value to a variable from an external source, changing the value in that variable does not change the setting in the source …
What you want to do is change the value AT THE SOURCE (the node in this case), e.g. by
… no need to read out the value before setting it.
Marc
--- Out of here. Being called a dick after having supported Houdini users for years is over my paygrade. I will work for money, but NOT for "you have to provide people with free products" Indie-artists. Good bye. https://www.marc-albrecht.de [www.marc-albrecht.de]
Okay I got it. So changed the code tried both solutions and I got errors shown below. I tried to google that error and it seems that i try to work with instance that has type None or doesn't exist ?
In your screenshot at the top of this thread, the node is called “tiger_rig_anim1”. Have you tried that?
Marc
--- Out of here. Being called a dick after having supported Houdini users for years is over my paygrade. I will work for money, but NOT for "you have to provide people with free products" Indie-artists. Good bye. https://www.marc-albrecht.de [www.marc-albrecht.de]