Clément SAINT-MARTIN
mayzcreates
About Me
専門知識
VFX Artist
業界:
Film/TV
Houdini Engine
INTERMEDIATE
プロシージャルワークフロー | Digital Assets | Mantra | Karma | Lighting | Pyro FX | 説明
BEGINNER
Environments | Motion Editing | Animation | Cloth | Solaris | Fluids | VEX
Availability
I am currently a student at Rebelway
Recent Forum Posts
Python: Add parameters from a list into the same folder 2024年10月1日12:51
Re: Thanks to the user Core, a workaround was found, rathen than using
I should've used
tempGrp.appendToFolder(folder, wedgeParm[0]); tempGrp.appendToFolder(folder, wedgeParm[1]); tempGrp.appendToFolder(folder, wedgeParm[2]); textAddParm.setParmTemplateGroup(tempGrp);
I should've used
for parm in wedgeParm: folder.addParmTemplate(parm) textAddParm.setParmTemplateGroup(tempGrp);
Python: Add parameters from a list into the same folder 2024年10月1日6:06
Hi everyone! I'm actually struggling with some code. I have multiple parameters created into the same list, but I can't add them in the same folder as it gives me an error. Here's a part of the code:
With this, I have 3 diffents parameters:
And when I try to add more than one parameters:
It gives me an error (but as long as I use one parameter only, it works):
So, do you have any idea why I can add one parameter to the list, but can't add the rest of it? Thanks!
text = selectedNode[0].path() textAddParm = hou.node(text); #Use the node selected wedgePath = hou.node(textAddParm.parm('soppath').eval()); #Take the path from a parameters in a node tempGrp = textAddParm.parmTemplateGroup() #Create temporary group to append new parameters tempGrp.remove("wedge"); #Delete existing folder if it exist folder = hou.FolderParmTemplate("wedge", "Wedges Paramaters References"); #Recreate the folder tempGrp.append(folder); wedgeParm = [] #Set wedgeParm fonction to be a list for child in wedgePath.children(): #There is 3 child in the soppath directing to the subnetwork paramaterName = child.parm("name1").eval(); parameterNameEval = "@" + paramaterName; parmTemplate = hou.FloatParmTemplate(str(child), paramaterName, 1, default_expression=[parameterNameEval]); wedgeParm.append(parmTemplate); #Append each parameter to wedgeParm list
With this, I have 3 diffents parameters:
wedgeParm[0] wedgeParm[1] wedgeParm[2]
And when I try to add more than one parameters:
tempGrp.appendToFolder(folder, wedgeParm[0]); tempGrp.appendToFolder(folder, wedgeParm[1]); tempGrp.appendToFolder(folder, wedgeParm[2]); textAddParm.setParmTemplateGroup(tempGrp);
It gives me an error (but as long as I use one parameter only, it works):
File "<console>", line 1, in <module> File "hou.session", line 258, in nameTest File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\hou.py", line 23461, in appendToFolder return _hou.ParmTemplateGroup_appendToFolder(self, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hou.OperationFailed: The attempted operation failed. Invalid indices/name/parm template
So, do you have any idea why I can add one parameter to the list, but can't add the rest of it? Thanks!
Day 2 | Geometry | Topobuild | Animation 2024年3月2日21:55
Topobuild SOP !