how do i use the variable in “tx”
ps:
>>> x = 200
in /obj/geo1/tx ; i don't know how to put the x variable in tx.
i try:
hou.ch(x)
hou.ch($x)
hou.ch(“x”)
hou.ch(“$x”)
$x
x
tx = x
can some one tell what command should i use to using Python HOM to input variable please ?
some Python basic question
3791 3 1- freesign
- Member
- 104 posts
- Joined: March 2008
- Offline
- graham
- Member
- 1908 posts
- Joined: Nov. 2006
- Offline
In your case you are attempting to access a variable declared in the global scope in a parameter. To do this you need to import the main module in your parameter. Putting the following into your will work.
import __main__
return __main__.x
http://www.sidefx.com/docs/houdini10.0/hom/independent [sidefx.com]
import __main__
return __main__.x
http://www.sidefx.com/docs/houdini10.0/hom/independent [sidefx.com]
Graham Thompson, Technical Artist @ Rockstar Games
- freesign
- Member
- 104 posts
- Joined: March 2008
- Offline
- freesign
- Member
- 104 posts
- Joined: March 2008
- Offline
-
- Quick Links