vex efit()

   1463   2   1
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Howdy,
I have an attribwrangle which I'm using to link a deformation to a null's x rotation.
The deformation is driven by a “painted” float attribute and used the efit() function to remap the (0,1) to (0,55) because that's the angle for null's rotation I want my deformation to reach 100%.
All is good, except apparently efit() doesn't do clamping, so if I go above rot x=55 or below 0, I also go outside 0-100% of my deformation.
I could simply avoid going outside (0,55) with my rot, but I'm wondering if there's a more elegant solution.
Thanks!

@P = lerp(@P, v@opinput1_P, f@opinput1_left_finger * efit(chf("../../RF_bone60_goal1/rx"),0,55,0,1));
User Avatar
Member
2162 posts
Joined: Sept. 2015
Offline
use the fit function, it clamps “omin” and “omax”.

http://www.sidefx.com/docs/houdini/vex/functions/fit.html [www.sidefx.com]
User Avatar
Member
1755 posts
Joined: March 2014
Offline
Ha, that was easy, lol.
Now, is there a way to limit the gizmo in the viewport to not go outside two values? For any transformation. It would be greatly appreciated by animators and not only.
  • Quick Links