Saya Posted July 27, 2017 Share Posted July 27, 2017 Hi Odforce, I was wondering if anyone has knowledge about how to enter your own default values of a created channel within the parameter editor. I want to use a mulitparm block(list), created from a folder type, and add parameters according to the amount of nprims. I want the parameters within this folder multiparm block (list) to have default values/expressions. The idea is to link each channel to an asset with a random so the parameters (see picture) are for each asset different. Not sure if this is good idea or if it could be achieved easier, im open for other ideas. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Saya Posted July 27, 2017 Author Share Posted July 27, 2017 Okay, i did something else, I put the assets through a forloop and gave it an ID nr and used that as a randnr. But im still curious if there is a way to create your own custom default values/expressions for a channel, within the parameter editor Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted July 28, 2017 Share Posted July 28, 2017 I doesn't look like you can have an expression for the default, just an integer. You can use an OnCreated script in an hda to copy the expression on to that value once that node is created though. Probably a good RFE if you wanted to submit it. something like this below in the OnCreated, make sure you change the language to python if you choose that language. kwargs["node"].parm('folder0').setExpression(opdigits(".")) Quote Link to comment Share on other sites More sharing options...
Saya Posted July 31, 2017 Author Share Posted July 31, 2017 Hey LaidlawFX, Thanks for the reply I tried to copy your setup and added your script on the "label", but I'm afraid I don't know how to get it to work. Also, I looked up in the houdini hou python reference to understand what your script does. but Im lacking knowledge on this too. Could you clarify it? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted July 31, 2017 Share Posted July 31, 2017 So in the attached hda, check out the Script Section in the Type Properties dialog, in there is a OnCreated Script set to python. The code line reads like this: kwargs["node"].parm('fd').setExpression('opdigits(".")') kwargs["node"] is the node at the time of creation, parm('fd') is the multiparm blocklist, setExpression() is placing down the expression opdigits(".") which is the number at the end of the node in hscript. You can replace opdigits(".") with any hscript expression you want. In this case when you copy and paste the hda, and another parameter in the block list will show itself. Not in and of itself useful except for demonstration of what you are looking for. multiparmBlocklistDefault.hda Quote Link to comment Share on other sites More sharing options...
Saya Posted August 1, 2017 Author Share Posted August 1, 2017 Cool! It should be placed over there. Well, it might not have a function right now but maybe i'll find something usefull for it. Thank you Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted August 1, 2017 Share Posted August 1, 2017 (edited) Your welcome, it's a hack for that specific node, probably should make an RFE for it. Edited August 1, 2017 by LaidlawFX I submitted the RFE Quote Link to comment Share on other sites More sharing options...
Saya Posted August 1, 2017 Author Share Posted August 1, 2017 What do you mean by: making an RFE. I'm not a native english speaker. Do you mean Reference For Evidence? and wheredid you submitted it to? Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted August 1, 2017 Share Posted August 1, 2017 No worries RFE is a Request for Feature Enhancement If you don't have paid SideFX support you can submit from the below link. If you do have paid support just contact your customer representative they'll put you through the correct channels. https://www.sidefx.com/bugs/submit/ Quote Link to comment Share on other sites More sharing options...
Saya Posted August 1, 2017 Author Share Posted August 1, 2017 Thanks again for the info 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.