Search - User list
Full Version: Is it possible to add more VEX Presets to Wrangle nodes?
Root » Technical Discussion » Is it possible to add more VEX Presets to Wrangle nodes?
Midphase
Just wondering if anyone knows how it might be possible to add more pre-coded VEX presets to the various Wrangle nodes in addition to the limited number which are already there?

If this is not possible, then I would urge the developers to consider making this option available since it would come in handy quite frequently as a quick shortcut to commonly used code.
vusta
don't see why not.

Open file VEXpressions.txt in: (naturally, BACK IT UP FIRST !)

C:\Program Files\Side Effects Software\Houdini 17.0.416\houdini\

scroll down about midway, there they all are…


#
# Attribute Wrangle SOP
#
attribwrangle/snippet
Color from Bounding Box
@Cd = relbbox(0, @P);

attribwrangle/snippet
Random Point Color:
float seed = 0.12345; // seed for rand
@Cd = rand(seed + @ptnum);

attribwrangle/snippet
Color Based on Threshold
int condition = (@P.x > 0) ? 1 : 0; // short form if() test
@Cd = set(condition, 0, 0); // write condition into red color

attribwrangle/snippet
Point Group on Threshold
string group = “mygroup”; // group name to add points to
int condition = (@P.x > 0) ? 1: 0; // short form if() test
setpointgroup(geoself(), group, @ptnum, condition);
@Cd = set( condition, 0, 0); // color if in group

attribwrangle/snippet
Fetch Second Input Cd Attribute
// Second input used as reference geometry
// Use prim and @primnum to get a matching primitive attribute.
@Cd = point(1, “Cd”, @ptnum);

go nuts adding your own I guess…..but BACK IT UP FIRST
goldleaf
Actually, you don't have to edit that file in the install dir. Houdini will look for any VEXpressions.txt files found in $HOUDINI_PATH or your preferences folder, and add those to the drop-down.

You can look at the original to follow its conventions.

# Lines starting with # are comments and ignored
#
# Each entry starts with no indentation and gives the key used
# by the menu callback. By convention, this is nodename/parmname.
# Multiple keys can be given for the same entry.
#
# The next line gives the name of the expression. Its indentation
# level is then used for the remainder of the text. All the
# code until the next parameter are appended together to make
# the snippet. All preceeding indentation is removed.
# Note that tabs == 8 is assumed.

attribwrangle/snippet
This is my cool snippet
printf("Hello world");

Hope that helps!
Midphase
Perfect, exactly what I was hoping for….thank you!
Mohanpugaz
That was cool to know!.

I usually do another simple trick for this. I find it cool to get the snippets
in the tab menu so that i can tab and search my snippet easily.



https://www.instagram.com/p/BsGW8kWgKhN/?utm_source=ig_web_copy_link [www.instagram.com]


also I use node presets for the same as well.


Thanks!
howiem
… and the super thing about saving stuff as node presets is that it also saves any spare parameters your preset node may need.

eg. find yourself constantly needing to add a bit of human wobble to your camera? Houdini gives you approximately 792 different ways to do this, but my favourite has been:

Create a null, put some expressions to create some noise on its rotations, and add some parameters to feed/control that noise. You don't want to have to tit about with the expressions every time you want to control the wobble when you can make a baby UI on the Null itself:



The expressions I've stuck on are like this:

turb($T/ch("freqx")+837,0,0,2)*ch("noise_scalex")*ch("noise_scale_global")

Change that 837 to a different number on each axis. Save it as a preset called “Camera wobble” or “Rotation noise” etc. That's the hard part over.

Now anytime you know you're gonna want a camera with a bit of humanising wobble, link your camera to a null, and animate that null with the main camera moves, instead of the camera object itself. Then you can stick another null in between:



and call up your wobble preset:



Now you have some nice friendly wobble controls, just by adding a null and picking a preset. Yummy.
vinyvince
I wish Sidefx add a search tab option for preset… But i have already request this many times.
Okay, i have more than 50 or 70 wrangles presets , how could i export it from h18 to h18.5 please?
Librarian
Easy just copy attwrangle.idx to your doc in 18.5 preset .I have 200 wrangles pres It Works .
vinyvince
Did i post that? Scusy, though i didn't . Yes, i have to relaunch houdini, first time i think i restarted it too early so that's why i thought it didn't work out!

Thanks you Tesan, have you seen this from David?


https://www.youtube.com/watch?v=stNN79VRAao&list=PLVPTX7KtnqVrBWGyYoGoG_If6U-v4miZ0&index=6 [www.youtube.com]
Librarian
@vinyvince I use binary editor (\bin\hidx.exe) that already exit in Root of Houdini, You can break shuffle do WY you Want with Presets
papsphilip
Librarian
@vinyvince I use binary editor (\bin\hidx.exe) that already exit in Root of Houdini, You can break shuffle do WY you Want with Presets
when i try to open it nothing happens. How do you use it to save vex snippets?
RudiNieuwenhuis
papsphilip
Librarian
@vinyvince I use binary editor (\bin\hidx.exe) that already exit in Root of Houdini, You can break shuffle do WY you Want with Presets
when i try to open it nothing happens. How do you use it to save vex snippets?

Very late to the party but I saw this and maybe you already found it but in case you didn't:
hidx.exe can be used from cmd and there it will help you how to use it.
Just go to window --> shell, and there you can type hidx and then enter, you'll get a help on how to use it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB