Jump to content

exchange @ptnum? or change @ptnum


Recommended Posts

Hi,guys!

Is there a way to exchange two points' @ptnum?

I want to exchange pt0 and pt1's @ptnum.And don't affect the prim Normal direction.

setpointattrib(0,"ptnum",0,1,"set");
setpointattrib(0,"ptnum",1,0,"set");

They don't work.

Thanks.

a20200315105932.png

Link to comment
Share on other sites

44 minutes ago, anim said:

you can't directly change ptnum, but you can store it to an attribute, change that attribute and then use Sort SOP to sort by that attribute

Good idea!Thank U very much!It works.

Edited by Willex
Link to comment
Share on other sites

44 minutes ago, animatrix said:

You need to use the Sort SOP and use your ptnum attribute but make sure every point has a valid unique number before swapping some.

In after anim :)

Thank U very much. It works.

Edited by Willex
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...