Search the Community
Showing results for tags 'execute'.
-
HI, I am learning python script. So far, I can execute python code by clicking a custom button, and it sets parameters of today(string) and switch(integer). I wonder how we can automatically execute that python code. For instance, when I select the node SOP, or houdini accesses node network from somewhere as need, these parameter values are automatically calculated or updated. Question 1 When I directly write python code in the parameter like second screenshot, it works for integer but not strings. Why did not the string work? Question 2 Let's say I have 20 parameters, and ideally I want to control all the parameters from one master python script in the code parameter, instead of writing python code each parameter 20 times. Then I was thinking : code parameter{string) > Callback script > exec(kwargs['node'].parm('code').eval()) However, auto-execution happens only when I change code's strings. And this is not what I am looking for. Execution should happen when I select the node or Houdini access it during node network calculation. If anyone knows how I should change, it would be appreciated. Thanks!
-
there are 2 nodes, and can we remotely execute a python script by another node, especially def too? For instance, there is a python_target null node. If I click its execute button, it writes C in result as I expect. Then I want to do same thing by a code of another python_remote_control null node. After succeeding controlling remotely, I also like to execute setA() remotely, too. Is that possible?
-
Hey guys is there any way to execute string in python ? its my string variable : "hou.parm('/obj/test3_FBX/materials/Google_Hybrid___7/Google_Hybrid___7_surface/map1')" i want to use it to set a parameter , but problem is its a string. im also tried to change it like this : myPath = '/obj/test3_FBX/materials/Google_Hybrid___7/Google_Hybrid___7_surface/map1' hou.parm(myPath) in 3dsmax maxscript you can using a execute syntax before string to do it. is there a similar way in python for that ?