I really don't understand how should I refer to an operator (HDA) from within scripts inside it (both from “Extra Files” and “Scripts” section).
When I call PythonModule's function I have to send it reference by hand since I didn't find any other solution:
hou.pwd().hdaModule().main(hou.pwd().path())
but this is crazy of course! There must be a “normal” way. This also doesn't work with “onInputChanged” script as I can't send any variable like before.
In both cases hou.pwd() returns context carrying operator (/out) not a operator itself.
thanks for help.
sy.
Python reference to its own operator
7867 8 1- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
- mhenrie
- Member
- 11 posts
- Joined: Oct. 2007
- Offline
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
hmm… not really, this was the first thing I've checked.
Unfortunately this returns /out instead of /out/my_operator
I've already found my old post on the same subject… strange but few months ago I was struggling with the same topic.
I was told that in case of hscript, a script in hdaModule (onCreate for example) gets reference by argument $arg1.
But I don't know how to send to python…
still looking,
thanks,
sy.
Unfortunately this returns /out instead of /out/my_operator
I've already found my old post on the same subject… strange but few months ago I was struggling with the same topic.
I was told that in case of hscript, a script in hdaModule (onCreate for example) gets reference by argument $arg1.
But I don't know how to send to python…
still looking,
thanks,
sy.
- rdg
- Member
- 401 posts
- Joined:
- Offline
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
- graham
- Member
- 1904 posts
- Joined: Nov. 2006
- Offline
- lucas
- Staff
- 270 posts
- Joined: July 2005
- Offline
- graham
- Member
- 1904 posts
- Joined: Nov. 2006
- Offline
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
-
- Quick Links