Notifications
Clear all

[Closed] How to preserve SO selections after mesh change??

 rsf

Hello. I’m working on a script that would (well…wish it would) divide faces near selected edges.
Well…big problem…how can I retain references to edges (or vertices) after geometry change??? Is there any way??
Thanks?

5 Replies

The problem is, once you change the topology, there are a different number of edges / vertices / faces so any indexing becomes useless.

One thing you might try is storing the positions of the faces (or whatever) and then cross referencing them after changes have been made, but this is going to be very slow.

One way around this is to use volume selections but I don’t think this is going to help you.

Maybe if you detach the faces to a new object, and then divide the topology and add it back it might work, but even then you are going to have to juggle some large bitarrays to get the desired reults.

J.

 rsf

Thanks J.
Maybe when adding sub elements, which is the case when subdividing, new element indexes are appended to the end…I’ll verify that…
Well…maybe not faces or edges because they actually change but vertices might mantain their indexes…
Thanks anyway

1 Reply
(@moosley)
Joined: 11 months ago

Posts: 0

This is true, verts that are added start at the highest index. I wrote a little door cutting script which used this method. For some reason though the cuts sometimes went a little weird, zooming to the object extents seemed to help in these instances, don’t know why though…

 rsf

Thanks

is it possible to use flags for your purposes?