How to preserve the order of points in the selection field ?

   933   6   1
User Avatar
Member
102 posts
Joined: 6月 2023
Offline
I made a wrangle that should process the points in order of selection. But as I discovered, in the point selection field, the point numbers after selection are sorted in ascending order. I never thought about it before. This, of course, is visually convenient, but it’s the opposite of what I need. Is it possible to make sure that the point numbers are saved in the selection field in the order in which they were selected?

Attachments:
points.png (39.3 KB)

User Avatar
Member
2041 posts
Joined: 9月 2015
Offline
You could select your points in desired order then make a group node and reference the group nodes 'basegroup' parameter in your wrangle for your pt ordered(as picked) string values.
User Avatar
Member
102 posts
Joined: 6月 2023
Offline
Thank you !!!
User Avatar
Member
208 posts
Joined: 6月 2023
Offline
I feel there should be a more direct way to do this... it perhaps has something to do with soputils. I still haven't figured it out tho.
User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
kodra
I feel there should be a more direct way to do this... it perhaps has something to do with soputils. I still haven't figured it out tho.

the Action Button in group parm for Attrib Wrangle would have to have:
kwargs['ordered'] = True
for it to preserve the selection order of points selected through that button, which it does not have

but if this is for the HDA wrapper then you can easily make that work for your HDA group action button
Edited by tamte - 2023年12月28日 11:39:35
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7722 posts
Joined: 7月 2005
Online
HGaal
I made a wrangle that should process the points in order of selection.

I thought VEX/VOPs can't have any interaction when processing in points mode? So I'm not sure how you would see a difference in your wrangle when processing points in a different order, other than in a printf.
User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
edward
HGaal
I made a wrangle that should process the points in order of selection.

I thought VEX/VOPs can't have any interaction when processing in points mode? So I'm not sure how you would see a difference in your wrangle when processing points in a different order, other than in a printf.
The screenshot shows it's running in Detail mode
So I assume the group Parm is evaluated inside and fed into expandpointgroup() to later run over those points in order

But it's true there is no need to hijack wrangle's group Parm for this, you can make a new one and fix the Action Button to preserve the order as mentioned above
Edited by tamte - 2023年12月30日 16:11:29
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links