==Python API==

Added Mesh.Modes() function, which allows scripts to get/set the selection
mode settings for meshes.  This was necessary in order for the mesh tools
such as triangulate, remove doubles, etc., to work properly.
This commit is contained in:
Ken Hughes
2006-01-17 06:18:43 +00:00
parent 0ea84e4a07
commit aeffb121c8
2 changed files with 64 additions and 8 deletions

View File

@@ -112,6 +112,11 @@ Example::
already associated with a group, else it does nothing.\n
- REPLACE: attempts to replace a weight with the new weight value
for an already associated vertex/group, else it does nothing.
@type SelectModes: readonly dictionary.
@var SelectModes: The available edit select modes.
- VERTEX: vertex select mode.
- EDGE: edge select mode.
- FACE: face select mode.
"""
AssignModes = {'REPLACE':1}
@@ -135,6 +140,19 @@ def New(name='Mesh'):
@return: a new Blender mesh.
"""
def Mode(mode=0):
"""
Get and/or set the selection modes for mesh editing. These are the modes
visible in the 3D window when a mesh is in Edit Mode.
@type mode: int
@param mode: The name of the mesh data object. See L{SelectModes} for values.
Modes can be combined. If omitted, the selection mode is not changed.
@rtype: int
@return: the current selection mode.
@note: The selection mode is an attribute of the current scene. If the
scene is changed, the selection mode may not be the same.
"""
class MCol:
"""
The MCol object