Created
February 17, 2016 20:18
-
-
Save K240-zz/50baba74c90c00688b2e to your computer and use it in GitHub Desktop.
Houdini PMVC deformer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int npoints = npoints(1); | |
vector cagePos = {0}; | |
int success; | |
float w[] = pointattrib(0, "PMVCweights", @ptnum, success); | |
if (success) | |
{ | |
for (int i = 0; i < npoints; i++ ) | |
{ | |
if ( w[i] > 0.0 ) | |
{ | |
vector sp = w[i]; | |
cagePos += point(1, "P", i) * sp; | |
} | |
} | |
@P = cagePos; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment