Search - User list
Full Version: python houdini doubt1
Root » Technical Discussion » python houdini doubt1
omy
could somebody tell me how to add a file parameter to a particular node

I followed the below link.but for some reason im getting typo http://www.sidefx.com/docs/houdini11.0/hom/hou/StringParmTemplate [sidefx.com]

could anyone tell me an example to do that
Achayan
a = hou.node('/obj/geo1/null1')
f = hou.StringParmTemplate( “file_reference”, “Reference File”, 1, default_value),string_type=hou.stringParmType.FileReference)
a.addSpareParmTuple(f)

check http://www.sidefx.com/docs/houdini11.0/hom/hou/ParmTemplate [sidefx.com] and http://www.sidefx.com/docs/houdini11.0/hom/hou/stringParmType [sidefx.com] also
omy
i have added a null node to geo1.
im trying to create a file parameter using the above code u given
getting errors for some reason.here is the attached thumbnail
Achayan
hou you trying to run ?

I am running from python shell

Python 2.5.2 (r252:60911, Dec 5 2008, 10:21:08)
on linux2
Houdini 11.1.50 hou module imported.
Type “help”, “copyright”, “credits” or “license” for more information.
>>> a = hou.node('/obj/box/null1')
>>>
>>> f = hou.StringParmTemplate( “file_reference”, “Reference File”, 1, default_value),string_type=hou.stringParmType.FileReference)
>>>
>>> a.addSpareParmTuple(f)
<hou.ParmTuple file_reference in /obj/box/null1>
>>>
>>>
omy
cool thank you
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB