Juhani Karlsson Posted November 16, 2015 Share Posted November 16, 2015 Yo,I have perfectly working dynamic multiparm list. I get all the values and params ect. only thin I can`t find is how to rename the labels of the parameters!! I`m doing it in a python callback. Sounds so simple, but I`m new to Houdini(ex-softie) so simple things can be hard hahaThanks a bunch,- J Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted November 16, 2015 Share Posted November 16, 2015 All you have to do is open the Edit Parameter Interface, select the parameter inside your Multiparm Block and rename the label with a '#' suffix, which will result in appending a number starting from 1 to your parm labels. Cheers, Manu 1 Quote Link to comment Share on other sites More sharing options...
Juhani Karlsson Posted November 17, 2015 Author Share Posted November 17, 2015 Hi, https://www.dropbox.com/s/xwtpkqlksjusshe/multiparm.png?dl=0 Thanks for your answer! However it is not quite like I want it.I need to make a character asset that loads them from file structure and updates multiparm list accordingly. At the moment though, I can`t rename the labels of the characters.Should I use some other way to do "dynamic" lists? Thanks a lot,- J Quote Link to comment Share on other sites More sharing options...
Juhani Karlsson Posted November 17, 2015 Author Share Posted November 17, 2015 (edited) How am I supposed to use the setLabel in the ParmTemplate? I`m bit confused how this should be done http://www.sidefx.com/docs/houdini14.0/hom/hou/ParmTemplate#setLabelI suppose I have to use the ParmTemplateGroup? for the edits? Hmmmm Edited November 17, 2015 by Juhani Karlsson Quote Link to comment Share on other sites More sharing options...
asnowcappedromance Posted November 17, 2015 Share Posted November 17, 2015 How am I supposed to use the setLabel in the ParmTemplate? I`m bit confused how this should be done http://www.sidefx.com/docs/houdini14.0/hom/hou/ParmTemplate#setLabel I suppose I have to use the ParmTemplateGroup? for the edits? Hmmmm >>> n = hou.node('/obj/geo2/null2') >>> ptg = n.parmTemplateGroup() >>> for i in ptg.entries(): ... print i ... <hou.ToggleParmTemplate name='copyinput' label='Copy Input' default_value=True> <hou.ToggleParmTemplate name='cacheinput' label='Cache Input' default_value=False> <hou.FolderParmTemplate name='folder0' label='Folder Name' folder_type=MultiparmBlock> >>> ptg.find("folder0") <hou.FolderParmTemplate name='folder0' label='Folder Name' folder_type=MultiparmBlock> >>> f = ptg.find("folder0") >>> f.parmTemplates()[0] <hou.FloatParmTemplate name='parm#' label='Label' length=1 naming_scheme=Base1 look=Regular default_value=(0,)> >>> me = f.parmTemplates()[0] >>> me.setName("newTest#") >>> me <hou.FloatParmTemplate name='newTest#' label='Label' length=1 naming_scheme=Base1 look=Regular default_value=(0,)> >>> f.setParmTemplates((me,)) >>> ptg.replace("folder0", f) >>> n.setParmTemplateGroup(ptg) >>> In order to change the name of the parm using Python, you'll have to use parmTemplates. This is a way to do it. For some reason, a Multiparmblock can't be found via parmTemplateGroup().findFolder(), but you can access it with just find(). Quote Link to comment Share on other sites More sharing options...
Juhani Karlsson Posted November 18, 2015 Author Share Posted November 18, 2015 Thanks Manuel !You saved my characters .ass! I shall be forever in dept. : )- J 1 Quote Link to comment Share on other sites More sharing options...
Andr1 Posted August 28, 2019 Share Posted August 28, 2019 sorry for the gravedig, do you know any way to set different labels to the different instances of the same multiparm parameter? Example for a multiparmblock parameter "myParm#": I want "myParm1" and "myParm2" instances to be labelled "Bingo", while "myParm3" instance should be labelled "Bongo". Is this even possible to do? cheers Quote Link to comment Share on other sites More sharing options...
animknight Posted August 29, 2019 Share Posted August 29, 2019 Not that I know of. Labels are part of the parm templates and I don't think there's a way to change the labels of individual instances of a parm in a multiparm block. -J Quote Link to comment Share on other sites More sharing options...
dejnoil Posted May 20, 2020 Share Posted May 20, 2020 (edited) I have a similar desire. My workaround for now has been to to create a label parameter for each parameter I want control over. Perhaps it will soothe your needs too until there's a better solution. For a left-justified label above the float(most easily accomplished) I would do the following: make a string: Strmylabel# -- you can add some kind of default expression to read in whatever you need or let the user adjust this -- if you are setting it yourself then make this parm invisible make a label: mylabel# -- turn off 'Main Label', turn on 'Horizontally Join to Next Parameter', and turn on all 16 labels -- In 'Label 1' put "<additional common words such as 'controls for: ' >`chs('Str' + substr($CH,0,strlen($CH) - 1 ))`<additional common words such as 'controls' or >" (you need '-1' because once you have more than Label 1 turned on the labels get additional #s added to the end so you don't want to get that number also) make a seperator: <doesn't matter> -- this will just help fill in rightspace so your label stays left-justified make a float: myfloat# -- turn off 'Main Label', setup however you want If the string parm is set to "hello3" and Label 1 has "Controls for: `chs('Str' + substr($CH,0,strlen($CH) - 1 ))` Objects" in Label 1 would yield the label: Controls for: hello3 Objects For right-justified labels that look like the normal label in-line with your float you can remove the seperater and move the Label expression to 'Label 16' replacing '-1' with '-2' since 16 is 2 digits long instead of 1 digit long. This method will force everything to the far right of the parameter interface You can do other similar things with attributes being read in using something like the following in the Label: `detailsmap(0,'myAttribute', opdigits( substr($CH,0,strlen($CH) )) )` Edited May 20, 2020 by dejnoil Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.