Python Variable to Hscript Global variable

   444   1   0
User Avatar
Member
7 posts
Joined: 5月 2018
Offline
hello! I am trying to get a python Variable to be brought into Houdini under the "alias and Variables" windows. I was wondering if anyone else has solve this issue and would be able to assist

[

cusompaths = test

hou.hscript("setenv = $custompaths")
hou.hscript("varchange $custompaths")

]

thanks

josh
Edited by joshuazt01 - 2021年2月23日 23:40:30
User Avatar
Member
7 posts
Joined: 5月 2018
Offline
AH my silly syntax got me

solution:

custompaths = "path"


hou.hscript("setenv VERSION=" + custompaths)
hou.hscript("varchange VERSION")
  • Quick Links