primitive order

   947   3   1
User Avatar
Member
74 posts
Joined: Jan. 2015
Offline


I have a line consisting of many segments, each an independent primitive. I deleted a few segments. This opened up a gap. In vex, with "addprim", I created a new prim to connect the gap. But the new prim is now at the end of the prim list, i.e. its prim ID doesn't naturally fit where it should, between its two neighbors. How do I do this? The Sort SOP has the "By vertex order" option, but it's for points only, not prims.
User Avatar
Member
7803 posts
Joined: Sept. 2011
Offline
It would normally be a tedious affair, but combining polypath (to build whole curves) with convertline (to convert back into individual segments) should take care of it. Preserving any groups or primitive attributes is probably going to be a challenge though.
User Avatar
Member
74 posts
Joined: Jan. 2015
Offline
Thanks, I think it will work.
User Avatar
Member
8594 posts
Joined: July 2007
Offline
assuming all line segments are connected after your surgery, then append:

Edge Transport
- Method: Edge Network

Attribute Promote
- Original Name: dist
- New Class: Prim

Sort SOP
- Primitive Sort: By Attribute
- Attribute: dist
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links