Problem for channel to recognize a python expression is a script (background stays black)

   2137   2   1
User Avatar
Member
6 posts
Joined: Aug. 2016
Offline
Hello,

Almost everytime I want to write a python expression in a channel it is not recognized as an expression and it is not evaluated as one.

For instance if I do Ctrl + E to edit a simple multi lines python code like :

import os

return ‘/obj/mynode’

it is recorded in the channel as :
import os return ‘/obj/mynode’

but the background stays black and there is no evaluation

even for single line expression, sometimes even this line is not recognized as code :
frame()

I tried also :
hou.frame()

Usually after a dozen of trials at what point it is recognized as script (don't know why it is ok sometimes) and once recognized as script (background turns blue)I can update the code and it is evaluated properly.

But entering the code a dozen of time for each channel is very painful and time consuming. I hope I got something wrong in the way I manipulate houdini but I can't figure it out what if it is the case. Any help please ?

Note : my node are Python expression by default. I didi not forget that.

My houdini is 15.5.565 on Windows 10.

Thanks,
Nicolas.
Edited by nicoalter - Sept. 9, 2016 07:16:08
User Avatar
Member
17 posts
Joined: March 2015
Offline
Enabling Python expressions is not enough.
You have to set key on that channel and then enter python code to evaluate.
User Avatar
Member
6 posts
Joined: Aug. 2016
Offline
It works :-)

Thank you so much Skoora.
  • Quick Links