davidyannick Posted March 18, 2021 Share Posted March 18, 2021 I'd like to customize one of my presets, but how can I extract the value of the ordered list? Thanks you for your help Quote Link to comment Share on other sites More sharing options...
underscoreus Posted March 18, 2021 Share Posted March 18, 2021 This is how I've got it set up using python at least, not sure about hscript: np = n.parm("nodeparm") val = np.menuLabels()[np.eval()] The "menuLables()" function gets all the labels in the ordered list and running "eval()" directly on the parameter gives you what index in the list the current selection is at. However, if you want your text field to update every time you change the dropdown you will have to recalculate every time you change the dropdown by adding a callback function to it. Hope it can still be useful! Quote Link to comment Share on other sites More sharing options...
davidyannick Posted March 18, 2021 Author Share Posted March 18, 2021 1 hour ago, underscoreus said: This is how I've got it set up using python at least, not sure about hscript: np = n.parm("nodeparm") val = np.menuLabels()[np.eval()] The "menuLables()" function gets all the labels in the ordered list and running "eval()" directly on the parameter gives you what index in the list the current selection is at. However, if you want your text field to update every time you change the dropdown you will have to recalculate every time you change the dropdown by adding a callback function to it. Hope it can still be useful! ok thanks gonna try this 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.