Second fruit of the “get me programming you addon” thread. This times a selection grow tool for connected edges (edgeloops or with corners). Its called EdgeGrow (well…) and uses the arrow keys: left/right for growing/shrinking in both directions, up/down for selecting other edges to continue on (for making corners/navigating verts with multiple +4 edges…
Traceback (most recent call last):
File “C:\Users\oem\AppData\Roaming\Blender Foundation\Blender\2.63\scripts\addons\mesh_edgegrow.py”, line 79, in invoke
do_edgegrow(self)
File “C:\Users\oem\AppData\Roaming\Blender Foundation\Blender\2.63\scripts\addons\mesh_edgegrow.py”, line 381, in do_edgegrow
for edge in bm.edges:
ReferenceError: BMesh data of type BMesh has been removed
location:<unknown location>:-1
The interactive control is also impressive, although not entirely intuitive - sometimes you are pressing right for the selection to go left etc… Maybe better would be up to grow more, down to grow less and right left to turn, but then again - there is no more and less in the script, just directions.
In reality I use it scarcely due to the multiple steps it involves, selecting part of the loop by hand proves quicker (I work on low poly models now). An alternative one-button solution would be more fitting to my situation. Select two edges, and a button continues the selection in the direction of the last selected edge, another one reverts. Since you already got most of the code, care to look at this? Cheers.
A very constructive comment indeed, to cater for this without changing too much in the actual addon, Ive done it as such: GrowEdge works as it always did except that RightArrow now defaults to growing in the direction of the last selected edge (do use edge select mode for this) and LeftArrow works in the opposite direction.