Jump to content
davidyannick

Reverse ptnum on a prim

Recommended Posts

attribute wrangle in details mode:

 

int prim = 1;
int pts[] = primpoints(0,prim);
setprimvertex(0,prim,0,pts[1]);
setprimvertex(0,prim,1,pts[0]);

 

  • Like 1

Share this post


Link to post
Share on other sites

or just use a reverse node and in "source group" add your prim 1 

Share this post


Link to post
Share on other sites

are you trying to reverse because of the skinning sop not working correctly right? if so both options should work. 

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, Sepu said:

are you trying to reverse because of the skinning sop not working correctly right? if so both options should work. 

yes indeed

Share this post


Link to post
Share on other sites

Your vex solution doesnt work as intended. But a reverse sop should do the trick or you could use this.

//run over primitives and just add the primitives you need to reverse to a group
int primpts[] = primpoints(0,@primnum);
primpts = reverse(primpts);
foreach(int index;int i;primpts){
    setprimvertex(0,@primnum,index,i);
    }

 

Share this post


Link to post
Share on other sites

from mem, I had similar problem with the order being whacky...try adding a polypath...

Edited by Noobini

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×