- went over every BM_SetIndex call and added comments about its use, if its setting dirty values or correct ones.
- replace loops over all elements _just_ to set index values, with a new function, BM_ElemIndex_Ensure(...), this will eventually only initialize values when they are dirty.
- walkers can be run in breadth-first order or depth-first order (previously there was only depth-first)
- walkers keep track of current depth (with this + breadth-first, select nth implementation is now trivial)
- new connected vertex walker (similar to shell walker, but returns vertices instead of edges)
- shell walker can be started from a vertex (in which case the walker starts by queueing all the edges incident on the vertex) or from an edge (walker starts by queueing the single edge)
- bug fix for walker reset (was emptying states, but not clearing the visithash)
- bug fix for select nth (indexing for deselection was walking through *all* connected elmeents, to match trunk it should only walk through *selected* connected elements)
For some cases, this will make dissolve work. For others dissolve will still fail (report unable to dissolve, not crash) in some cases. To get dissolve to work in these cases we need to define what happens when you dissolve a disk that has faces which share more than one edge.
This code is from Andrew Wiggen (ender79) and reviewed by me.
His comments:
Implements some tools that were marked TODO:
- select nth
- separate loose parts
And also fixes a few bugs;
- extrude and move on normals causes faces to disappear until the move starts
- hiding verts/edges/faces does not deselect them
- deleting a selection sometimes deletes too much (e.g. a solid cube and a wire cube build of only edges, join them on a single edge, select only the faces of the solid cube and delete, some of the deselected edges from the wire cube were also being deleted)
----------------------------------------------
Loop multiselect operator brought back. It can
be accessed via the select->edge loop and
select->edge ring menu entries or through the
ctrl-e edge specials menu.
----------------------------------------------
Select non manifold was not working properly
because BM_Nonmanifold_Edge considered border
edges to be manifold.
1. Removed pinning, at least until after trunk
reintegration (it's a usefull feature, but
incomplete).
2. Ripped out the subclassing code I originally
wrote so bmesh would be more usable for modifiers
(I ended up improving CDDM instead).
3. Inlined some of the macros in bmesh.h, still need to
do the macros in bmesh_operator_api.h.
4. Removed the BMESH_ITER_*** macros (except for BMESH_ITER_INDEX).
They were too clunkly to be worth it.