Skip to content

Instantly share code, notes, and snippets.

@K240-zz
Created February 17, 2016 20:18
Show Gist options
  • Save K240-zz/50baba74c90c00688b2e to your computer and use it in GitHub Desktop.
Save K240-zz/50baba74c90c00688b2e to your computer and use it in GitHub Desktop.
Houdini PMVC deformer
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