Python: Access currently running Script SOP

   2748   2   1
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
I have a Python script running through a Script SOP and I need to access the node connected to the Script SOP in my python script. This is no problem at the moment since I can just hard code the location of the node. However it would be way better to have the script itself know which Script SOP it's running from, and then use the input of the script node.

So, how do I get my script to be aware of which node is running it?
User Avatar
Member
242 posts
Joined: Jan. 2008
Offline
I´m no python dude and maybe i missunderstand but,

scriptSOP = hou.pwd()
input = scriptSOP.inputs()

Seams to give you what you want.
User Avatar
Member
166 posts
Joined: Oct. 2008
Offline
Works like a charm! Tackar!
  • Quick Links