Switching the selection mode between vertices, edges, and polygons in mesh edit mode is mapped by default to pressing the 1, 2, and 3 keycodes on the keyboard. However, if it is more comfortable to use these hotkeys for other functions, we can change this mapping.
To manipulate an object with an armature, if we only need to ensure that a bone has a full influence on it, we can snap the object not to the whole armature, but directly to the desired bone.
Some Blender operators can only be called from the workspace for which they are intended.
If you call from the Python console, for example, an operator intended only for working in the 3D Viewport area, the operator will not be executed:
Python
1
2
3
bpy.ops.wm.toolbar()
# {'CANCELLED'}
or it will fail with an error message about the incorrect context:
Python
1
2
3
bpy.ops.view3d.background_image_add()
# RuntimeError: Operator bpy.ops.view3d.background_image_add.poll() failed, context is incorrect
However, we can still execute operators from a non-native working area. To do this, we can pass the first implicit parameter to any operator – a pointer to the context of the area in which this operator should be executed. This parameter commonly named the “overridden context”.
To switch the active tool from the T-panel in the 3D viewport window, we need to call the appropriate operator and pass the “idname” of the required tool in its “name” parameter.
For example, to enable the “Select Circle” selection toll, we need to call: