[Sidefx-houdini-list] Some python questions...

Francois-Xavier Boussard b.fx at free.fr
Thu Feb 12 08:16:00 EST 2009


Bonjour Guillaume

You may try that :

nullObj = hou.node('obj').createNode('null')
mysparefloat = hou.FloatParmTemplate("myfloat" , "Myfloat", 1)
nullObj.addSpareParmTuple(mysparefloat, in_folder=(["MYFOLDER"]), create_missing_folders=True)

To see what is going on look at the script that houdini generate itself to create the node with:

hcreate = nullObj.asCode(save_creation_commands=True)
print hcreate

hope this help
francois


----- Mail Original -----
De: "guillaume laforge" <guillaume at alamaison.fr>
À: sidefx-houdini-list at sidefx.com
Envoyé: Jeudi 12 Février 2009 11:47:15 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: [Sidefx-houdini-list] Some python questions...

Hi,

I can't find a way to create a spare parameter in python !

The only related methods seems to be  "addSpareParmTuple". But I don't
want to add a vector parameter, just a float (I can't find something
like "addSpareParm" ).
Trying the "addSpareParmTuple", I can't figure out how to define the
"parm_template" argument ?

I'm also trying to find a parameter in a specific folder and it always
fail. Here is a snippet :

nullObj = hou.node('obj').createNode('null')
nullObj.addSpareParmFolder("TEST")
nullObj.parmsInFolder(("TEST"))

It returns an "OperationFailed: The attempted operation failed." message.

Is it possible to create a spare parameter in Python in a specific folder ?

It looks like I miss something really simple but I can't find the light :/.

Cheers

-- 
Guillaume Laforge
3d Technical Director
http://www.alamaison.fr
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list



More information about the Sidefx-houdini-list mailing list