python houdini doubt1

   2665   4   0
User Avatar
Member
71 posts
Joined: Feb. 2010
Offline
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
User Avatar
Member
54 posts
Joined: March 2008
Offline
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
User Avatar
Member
71 posts
Joined: Feb. 2010
Offline
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

Attachments:
filepythondoubt.jpg (33.2 KB)

User Avatar
Member
54 posts
Joined: March 2008
Offline
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>
>>>
>>>
User Avatar
Member
71 posts
Joined: Feb. 2010
Offline
cool thank you
  • Quick Links