O'Reilly logo

Blender 2.49 Scripting by Michel J. Anders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Selecting poles

In order to select vertices with a certain number of steps we may perform the following steps:

  1. Check whether the active object is a Mesh.
  2. Check whether we are in object mode.
  3. Show a pop-up menu to input the minimum number of edges.
  4. For every vertex:
    • Iterate over all edges, counting occurrences of the vertex
    • If count is larger or equal to the minimum, select the vertex

This approach is straightforward and simple. The function that is responsible for the actual work is shown below (the full script is called poleselect1.py). It follows our outline closely. The actual selection of a vertex is effected by assigning to the sel attribute of the vertex. Note also that the v1 and v2 attributes of an edge object are not indices into the verts ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required