'ObjNode' object has no attribute 'setParm'
3732 9 1- maxsniezek
- Member
- 5 posts
- Joined: Oct. 2016
- Offline
Hello,
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.
I will be grateful for your help
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.
I will be grateful for your help
- jsmack
- Member
- 7988 posts
- Joined: Sept. 2011
- Offline
Is this what you were trying to do:
https://www.sidefx.com/docs/houdini/hom/hou/Node.html#setParms [www.sidefx.com]
https://www.sidefx.com/docs/houdini/hom/hou/Node.html#setParms [www.sidefx.com]
- maxsniezek
- Member
- 5 posts
- Joined: Oct. 2016
- Offline
- malbrecht
- Member
- 806 posts
- Joined: Oct. 2016
- Offline
What are you trying to do?
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
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]
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]
- maxsniezek
- Member
- 5 posts
- Joined: Oct. 2016
- Offline
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.
Max
Max
Edited by maxsniezek - March 25, 2020 10:58:04
- malbrecht
- Member
- 806 posts
- Joined: Oct. 2016
- Offline
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
What you want to do is change the value AT THE SOURCE (the node in this case), e.g. by
hou.node("/obj/tiger_rig_anim").setParms({"spine_squat_front":0})
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]
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]
- tamte
- Member
- 8730 posts
- Joined: July 2007
- Offline
- maxsniezek
- Member
- 5 posts
- Joined: Oct. 2016
- Offline
- malbrecht
- Member
- 806 posts
- Joined: Oct. 2016
- Offline
In your screenshot at the top of this thread, the node is called “tiger_rig_anim1”. Have you tried that?
Marc
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]
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]
- maxsniezek
- Member
- 5 posts
- Joined: Oct. 2016
- Offline
-
- Quick Links