Attrib wrangle tips?

   2770   3   2
User Avatar
Member
665 posts
Joined: July 2005
Offline
Hey Houdini Wizards,

Like many of you I am jumping on the attribwrangle bandwagon. The presets thread is a pure gold mine that I enjoy learning from.
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=35541 [sidefx.com]

I am curious about other tips people have for integrating wrangles into their workflow. In particular, I find myself with a zillion new point attributes hanging around that I may or may not remember to delete. This has the knock off effect of ballooning my disk space usage.

getbbox(v@min, v@max);
v@center = (@min+@max)/2;
v@v = (@P - @center) * ch('mult');

This script alone has added 4 vectors to my network, when I really only wanted 1.

How are people dealing w/ this, any chance there are some slick tricks the houdini wizards have come up with? And really, what else is awesome about wrangle nodes that people have found??

thanks!
-j
User Avatar
Staff
750 posts
Joined: Oct. 2012
Offline
If you don't want to create attributes, just do:


vector min, max;
getbbox(min, max);
vector center = (min+max)/2;
v@v = (@P - center) * ch('mult');
User Avatar
Member
665 posts
Joined: July 2005
Offline
That's great, Cameron!

Are there any other implied differences to using vector vs. v@ ?

Thanks!
-j
User Avatar
Member
15 posts
Joined: May 2014
Offline
The magic of his code isn't using vector vs. v@
The key is that he removed the @.
This just creates local variables and not actual attributes.
As you discovered, it avoids creating additional attributes, and it's also more forgiving of default values.
  • Quick Links