also added a safety check for the crash, even though reverting fixes.
bmesh_to_mesh_exec() could set me->mface array to NULL but leave me->totface when notellelation=1, which is likely to give trouble elsewhere.
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)
back in selection history for bmesh->mesh
and mesh->bmesh conversions:
----------------------------------------------
Select Vertex Path had wrong invoke callback
(shouldn't have any?).
Also selection history was not converted when
doing bmesh->mesh or mesh->bmesh conversions.
This meant that tabbing in and out of editmode
would make your selection history dissapear.
Undo pop would also not preserve selection
history so any operators that relied on it
would not work when you adjusted their settings.
and select loose verts/edges:
----------------------------------------------
Split select by number of vertices and select
loose verts/edges into seperate functions.
Previously select by number of vertices was
also accessed through two different UI items,
"Select Quads" and "Select Triangles". Now
it is one function with a integer property
for selecting the size of the face you want
selected.
Also added an option to modify the behavior
of the selection. Can now select whether you
want to select faces that have vertices
equal to, less than or greater than the number
of vertices in operator property.
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.
Multires interpolation now works on cases like
simple cubes. (though it isn't perfect
when bevelling sharp corners).
Normal flipping is handled correctly, and
multires interpolation now works on
normal-inconsistent meshes (so long as
they are manifold, at least).