Jump to content
Sign in to follow this  
Joshuazt

Python Variable to Hscript Global variable

Recommended Posts

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")

][/code]

thanks

josh

Edited by Joshuazt

Share this post


Link to post
Share on other sites

Nevermind! Sorted it

 

  custompaths = "path"


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

Share this post


Link to post
Share on other sites

Hey there,

Maybe this will help. These are the python methods that are available that do the job without having to wrap hscript.

hou.putenv, hou.getenv, hou.unsetenv

Cheers

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×