Jump to content

channels do not recognize always my entry as a python expression (my setup is python as default)


nicoalter

Recommended Posts

Hello,

how can I force a channel in a sop to evaluate my python expression as an expression (not as the final value) ?

With hscript it is simple I write : `mycode`

But with Python I don't get it, sometimes I write something like :

frame()

or

hou.frame()

or

hou.pwd()

And it is recognized immediately as an expression and is evaluated (blue/cyan background), sometimes the very same text is considered as the final value (background black).

I sometimes need to enter the code many times in order to have it recognized as code. I do not understand why ?

Any help is very welcome (I am on houdini 15.5.565 on Windows 10)

Thanks,

Nicolas

 

Link to comment
Share on other sites

You need to change the expression language for every single node where you want to use Python. Click that Black H icon in the upper right area. Choose Python instead of Hscript. If you know you are going to use Python all the time you can set the system default to be Python instead of hScript under Houdini Preferences\Scripting

The only other thing that comes to mind is that the Preferences has a little note which states that every "new" node will inherit this setting. Perhaps failures are occurring on old nodes...?

Edited by Atom
Link to comment
Share on other sites

Thanks Atom for the help but unfortunately I already did both things you told me.

My default scripting in my preferences is "python"

I try only on new nodes I created once my preferences were setup (and saved I closed houdini and reopened) to python. WhenI create a new node it is with the Python icon on the script interpretation icon.

That is why I am puzzled.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...