[Sidefx-houdini-list] Python expression in string field parameter

Pablo Giménez pablogipi at gmail.com
Tue Jan 18 08:35:38 EST 2011


Hi all.
I have a string filed parameter,a file parameter to be exact, and I
want o to use a python function to use information from other
parameters to conform a file path.
I have my function in myModule.getFilePath, and I have tried to call
to it using this form of python expression:
`myModule.getfilePath(chs('loc'), chs('type'), chs('subtype'),
chs('element'), chs('ver'))`
My guess is that this parameter will be recognized automatically as a
python expression, but not sure if the systav I am using is correct or
not.
Because I got just an empty string I decided to wrap my python
expression into a hscript expression like:
`pythonexprs(myModule(chs('loc'), chs('type'), chs('subtype'),
chs('element'), chs('ver')))`
But again I got nothing.
For testing my python function just do this:
def getDataOutLocation(location, type, subtype, element, ver):
   return "Hello World"

Is the first time I try to use python expressions in parameters so I
guess I am missing something here.
Any advice?
Thanks

-- 
Un saludo
Best Regards
Pablo Giménez



More information about the Sidefx-houdini-list mailing list