Hello world Posted November 16, 2011 Share Posted November 16, 2011 I have created the multiparm parameter I have also created the geometry-file parameter.but when i add it to the multiparm list paramter as a child.Nothing happens for no reason.Code is executing.But it doesnt seem to return any error. Please tell me how to proceed mpl=hou.FolderParmTemplate(........) hda.spareParmParmTuple(mpl) geo=hou.StringParmTemplate("ggeo","GEO",1,default_value=(["default.bgeo"]),naming_scheme=hou.parmNamingScheme.Base1,string_type=hou.stringParmType.FileReference,menu_items=([""]),menu_labels=([""]),icon_names=([]),item_generator_script="",item_generator_script_language=hou.scriptLanguage.Python,menu_type=hou.menuType.StringReplace) hda.addSpareParmTuple(geo) mpl.addParmTemplate(geo) Quote Link to comment Share on other sites More sharing options...
sam.h Posted November 16, 2011 Share Posted November 16, 2011 (edited) I think it should be more like this templateGeo = hou.StringParmTemplate('geoName', 'geoName', 1, ("",)) templateFolder = hou.FolderParmTemplate("asd","Asd",folder_type = hou.folderType.MultiparmBlock, parm_templates=(templateGeo,)) hou.node('/obj/null1').addSpareParmTuple(templateFolder) Notice that in templateFolder I give it the template for the parm Apparently you can do it like this; hou.node('/obj/null1').addSpareParmTuple(templateGeo,('asd',) ) ('asd' is the folder) But that didn't work for my multiparm block. It does work if you use the "Transform" or something. I found this useful: http://houdinitips.posterous.com/ Edited November 16, 2011 by sam.h Quote Link to comment Share on other sites More sharing options...
Omy Posted November 16, 2011 Share Posted November 16, 2011 (edited) Nice example! Now if we try to load the bgeo file,it doesnt load.Do we need to add the file node and reference this. If so,Could you give share a small snippet of code so that if the user presses the + button,the file node is created.Could this be done? Edited November 16, 2011 by Omy Quote Link to comment Share on other sites More sharing options...
sam.h Posted November 17, 2011 Share Posted November 17, 2011 Nice example! Now if we try to load the bgeo file,it doesnt load.Do we need to add the file node and reference this. If so,Could you give share a small snippet of code so that if the user presses the + button,the file node is created.Could this be done? In sops you would have file node, then a copy node. On the copy node, number of copies should be referencing the multiparm folder, so it gets the number of entries in the block. On the copy node, turn on stamping and stamp $CY to copyNum. On the file node use an expression like chs("../geopath" + stamps("../copy1","copyNum","")) I can put together an example if that doesn't make sense. Quote Link to comment Share on other sites More sharing options...
Omy Posted November 17, 2011 Share Posted November 17, 2011 (edited) hi I tried your method. what is geopath pointing to? the dig asset which contains the multiparm folder list? seems to be not working for me.Im getting warning and error.dont know where i made mistake.A hip file would be really great. Thank you Edited November 17, 2011 by Omy Quote Link to comment Share on other sites More sharing options...
sam.h Posted November 17, 2011 Share Posted November 17, 2011 Here you go, the chs("../fileStamp") expression is pointing to the multiparm block, and I am appending the copy number onto the end of the channel path with '+'. fileStamp.hip Quote Link to comment Share on other sites More sharing options...
Omy Posted November 17, 2011 Share Posted November 17, 2011 awesome! Cheers 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.