Define custom expression function

   1987   2   0
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
http://www.sidefx.com/docs/houdini/network/expression_functions.html [www.sidefx.com]


In the edit aliases and variables window you can define a custom expression function. What file are these saved in / what is the best way to manage these in a pipeline?


Is there anyway to export or define these from python?

thanks
Edited by zdimaria - Oct. 1, 2018 14:30:28
.
User Avatar
Member
1904 posts
Joined: Nov. 2006
Offline
All the custom expression stuff is saved into a hip file. We've had issues with old/bad expressions stored in scenes causing issues in the last.

Everywhere I've ever worked has always just had one or more hscript files which define custom expressions and then have startup code that loads them via the hscript exread command.

foo.expr

string
ddEye()
{
return pythonexprs(“houdinipipeline.util.functions.ddEye()”);
}


hou.hscript(“exread /path/to/foo.expr”)

There are a few other hscript commands to do things with them but there is no Python support.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
this is very helpful, thanks graham!
.
  • Quick Links