Access variables between two Python SOPs

   1207   2   1
User Avatar
Member
74 posts
Joined: Jan. 2015
Offline
Is there a way to make variables in one Python SOP available to the Python script in another Python SOP?
Edited by element33 - June 6, 2022 07:56:20
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
You can use the hou.session module (where you can store also functions available everywhere in the houdini session)
You can write directly to it in the Python Source Editor (access it from Windows menu)

Or you can write to it from any python location
hou.session.myVar = 1
print(hou.session.myVar)
User Avatar
Member
74 posts
Joined: Jan. 2015
Offline
Great, thanks.
  • Quick Links