bunker Posted March 26, 2018 Share Posted March 26, 2018 Does anyone knows if it's possible to define the UI of Wrangle nodes using some kind of vex #pragma? Quote Link to comment Share on other sites More sharing options...
davpe Posted March 26, 2018 Share Posted March 26, 2018 you can define UI by code like @myparm = ch("mychannel"); this will reference a float channel named "mychannel". the slider value will be then picked as an input value for associated parameter "myparm" referenced channels are created by clicking on "Create spare parameters for each unique call" (located by the right side of the vex editor window). for other kinds of UI you can use functions chramp (for ramps), chi (for integer channel), etc... Quote Link to comment Share on other sites More sharing options...
bunker Posted March 26, 2018 Author Share Posted March 26, 2018 I meant for more advanced UI definition, eg: setting the default values of parameters, min/max ranges, name of parameters in the UI,... something like pragmas, but the wangle equivalent, if that exists: #pragma range seed 0 10 #pragma label amp "Noise Amplitude" #pragma hint __nondiffuse toggle // Define as a toggle button Quote Link to comment Share on other sites More sharing options...
davpe Posted March 26, 2018 Share Posted March 26, 2018 it does exist, never used it thou. check this docs page anyway: http://www.sidefx.com/docs/houdini/vex/pragmas.html Quote Link to comment Share on other sites More sharing options...
davpe Posted March 26, 2018 Share Posted March 26, 2018 ...but typically you can do everything you need via Edit Parameter Interface dialog and saving node presets. pragmas are used mostly when you're writing shaders or that kind of low level stuff. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted March 26, 2018 Share Posted March 26, 2018 If you look at $HFS/houdini/python2.7libs/vexpressionmenu.py This is the the script they use to build the parameters by calling vexpressionmenu.buildSnippetMenu('attribwrangle/snippet') It might be possible to expand on their code to fit your needs, or submit an RFE for more capabilities to be added to this function beyond channel data type detection. 1 Quote Link to comment Share on other sites More sharing options...
bunker Posted March 26, 2018 Author Share Posted March 26, 2018 thanks John, I think I'll submit and RFE yes. Quote Link to comment Share on other sites More sharing options...
ikoon Posted June 28, 2018 Share Posted June 28, 2018 Hi @bunker first I want to thank you very much, you give precious info on the forum and you helped me many times! As regards this thread. Did you find any solution? I scripted this for myself: http://lex.ikoon.cz/vex-ui-markup/ On the bottom of that page, there are some examples. Here is another one: 2 Quote Link to comment Share on other sites More sharing options...
bunker Posted June 28, 2018 Author Share Posted June 28, 2018 Thanks Jiri! yes this is exactly what I was looking for - just never had the time to do it myself. Would be great if Sidefx added this feature 1 Quote Link to comment Share on other sites More sharing options...
ikoon Posted June 28, 2018 Share Posted June 28, 2018 I hope it may help you. The initial idea is from here, Matt Estela. I tried to make the python scripts as clean as possible, but I have to say I am python beginner. So let me know if you get any errors, I will try to fix them asap. It would be really easy for SESI to implement something like this, but maybe the biggest problem is to agree on the markup system, on the conventions and rules. Quote Link to comment Share on other sites More sharing options...
Bandu Posted February 11, 2019 Share Posted February 11, 2019 Thanks @ikoon, this is awesome !! Thanks a lot, I will use it for sure ! 1 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.