Jump to content

wrangle nodes pragma?


bunker

Recommended Posts

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...

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

...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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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.

Link to comment
Share on other sites

  • 7 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...