New Selection Modes

When entering Edit Mode for a Mesh, you now have the choice for three selection modes. These are shown as icons in the 3D header (hotkey: Ctrl Tab).

 

Vertex Select

Select vertices as usual, fully compatible with how previous version work

 

Edge Select

Vertices are not drawn anymore, and selections happen by default on the edges. It is a true edge select, meaning that you can select three out of four edges in a face, without automatic having the 4th edge selected.

 

Face Select

Instead of vertices, now selection 'points' are drawn in the face centers. Selected faces also get a colored outline, like for edges. This also is true face select, for each face individual regardless selection status of its vertices or edges.

 

While holding SHIFT, and press a selection mode, you can also combine the above choices. Now selection becomes mixed, and will behave as expected.

For example; in Edge+Face select mode, selecting the 4 edges of a face will select the face too.

 

The selection modes and optional drawing modes (like transparant faces, normals, or solid drawing) all work together. All of Blender's mesh editing tools now react to the correct selection mode as well.


Quick Edge/Face Loop Selection

You can now also quickly select an edge loop (in edge select mode) or a face loop (in face select mode) by Alt-Clicking on either (in edge mode) the edge that forms part of the loop or (in face mode) the edge that connects two faces that form part of the loop. Check out this demo movie for a better description.

 

Demo movie (300KB AVI)

Lasso Select

Another new selection tool is the lasso tool. Lasso is operated with a Ctrl Leftmouse drag (or Ctrl Rightmouse, depending on your selection mouse button preference). It allows you to draw a shape, within which vertices, edges, faces, or objects in object mode are selected.


Extrude

Extruding in Edge or Face Select mode allows much more precise control over what's extruded and what should be excluded. Try for example a checker pattern selection, and extrude it.

 

When extruding faces, the extrusion occurs along the (averaged) normals of the old face(s), for much easier workflow in 3D views. Pressing a single 'G' (Grab/Move) or 'R' (Rotate) or 'S' (Scale) will change transform modes as usual.

New methods of extrusion have also been added. The first two, Region and Individual Faces operate on face selections, keeping the new faces together or splitting them apart along the individual face normals. In edge select or vertex select modes, it's also possible to extrude Only Edges or Only Vertices.

Region
Individual Faces
Only Edges
Only Vertices

ZBuffer Clipped Selection

This new option will hide drawing and disable selection of invisible vertices, edges and faces. It is based on the z buffer (depth) values of vertices, edge endpoints or face-centers. Since it's using the same algorithms as for display, selection will be highly accurate. This selection mode is toggled with an icon in the 3D View header:

Subdivision Surfaces

When using the Optimal mode for SubSurfs, Blender will now draw the (selectable) edges and faces on the subdivided geometry itself, hiding the original base mesh cage completely. This also works for the 'Draw faces' and 'Draw edges' visibility options. You can check out a demo movie made during the development period.




Fake Polygons

As an initial step to optimise face selection, you can also merge sets of co-planar faces. Just select a bunch of faces and press the F Key. Note that the selected faces should form a polygon and not have interior vertices.

 

This new FGon (Fake-Gon, Face-Gon, whatever :) feature can be extended in the future to become more 'real' n-gon style polygons, especially when subdivide and cut tools, and subdivision surfaces work with it, though right now its usage is limited to hiding edges for large filled polygons.


Demo video (900KB AVI)

Rotate Edge

Rotate Edge is a new tool by Johnny Matthews that rotates an edge within the two faces that it connects, making it very easy to restructure mesh topology without having to delete edges and reconnect them. It is currently in the Mesh > Edges menu and in the 'Edge Specials' menu (Ctrl E). it works for any edge that is on only 2 faces.

Other Things to Note

  • Hiding edges/faces will also behave different based on Select Mode.
  • While editing, normals of faces are updated always now
  • Border select (BKEY) has 2 different rules for edges; when one edge is fully inside of the border, it will only select edges that are fully inside. Otherwise it selects each edge intersecting with the border.
  • In face mode, adding vertices, edges or a circle is invisible...
  • "Add > monkey" now works as a normal primitive (rotated and on 3d cursor)
  • Mesh undo was fully recoded, hopefully solving issues now with Vertex Keys and Groups
  • Going in and out of editmode was fully recoded. Especially on larger models you'll notice substantial speed gain.
  • Todo: Add 'FaceSelect mode' functionality in EditMode, including display and editing of UV texture.

EditMesh Development Notes

Usage of flags in general

 

The "->f" flags are reserved for the editmesh.c and editmesh_lib.c core functions. Actually only selection status is there now.

The "->f1" and "->f2" flags are free to use. They're available in vertex/edge/face structs. Since they're free, check carefully when calling other functions that use these flags... for example extrude() or subdivide() use them.

 

Selection flags

 

EditVert: eve->f & SELECT

EditEdge: eed->f & SELECT

EditFace: efa->f & SELECT

 

 

  • Selection is only possible when not-hidden!
  • Selection flags are always up-to-date, BUT:<indent>- if selection mode >= SELECT_EDGE vertex selection flags can be incorrect</indent><indent>- if selection mode == SELECT_FACE vertex/edge selection flags can be incorrect</indent>

This because of shared vertices or edges.

 

 

  • use for selecting vertices:<indent>eve->f &= SELECT</indent>
  • use for selecting edges always:<indent>void EM_select_edge(eed, 1) // 1 = select, 0 = deselect</indent>
  • use for selecting faces always:<indent>void EM_select_face(efa, 1) // 1 = select, 0 = deselect</indent>

 

 

  • To set the 'f' flags in all of the data:<indent>void EM_set_flag_all(int flag);</indent><indent>void EM_clear_flag_all(int flag);</indent>
  • the old faceselectedOR() and faceselectedAND() are still there, but only to be used for evaluating its vertices

 

Code hints for handling selection

 

If the selectmode is 'face'; vertex or edge selections need to be flushed upward. Same is true for 'edge' selection mode. This means that you'll have to keep track of all selections while coding... selecting the four vertices in a face doesn't automatically select the face anymore.

 

However, by using the above calls, at least selections flush downward (to vertex level). You then can call:

 

void EM_selectmode_flush(void);

 

Which flushes selections back upward, based on the selectmode setting. This function does the following:

 

 

  • if selectmode 'vertex': select edges/faces based on its selected vertices
  • if selectmode 'edge': select faces based its selected edges

 

This works fine in nice controlled situations.

 

However, only changing the vertex selections then still doesn't select a face in face mode! If you really can't avoid only working with vertex selections, you can use this call:

 

void EM_select_flush(void);

 

Now selection is flushed upward regardless current selectmode. That can be destructive for special cases however, like checkerboard selected faces. So use this only when you know everything else was deselected (or deselect it). Example: adding primitives.

 

 

Hide flags

EditVert: eve->h

EditEdge: eed->h

EditFace: efa->h

 

 

  • all hide flags are always up-to-date
  • hidden vertices/edges/faces are always deselected. so when you operate on selection only, there's no need to check for hide flag.

 

Unified undo for editmode

 

New file: editmode_undo.h

A pretty nice function pointer handler style undo. Just code three functions, and your undo will fly! The c file has a good reference.

 

Also note that the old undo system has been replaced. It currently uses minimal dependencies on Meshes themselves (no abuse of going in/out editmode), and is restricted nicely to editmode functions.

 

Going in/out editmode

 

As speedup now all vertices/faces/edges are allocated in three big chunks. In vertices/faces/edges now tags are set to denote such data cannot be freed.

 

Also the hashtable (lookup) for edges uses no mallocs at all anymore, but is part of the EditEdge itself.