.. _bpy.ops.buttons:

*******
Buttons
*******

.. _ui-operator-buttons:

Operator Buttons
================

.. figure:: /images/interface_controls_buttons_buttons_operation.png
   :align: right

   Operator button.

Operator buttons execute an :doc:`Operator </interface/operators>`
which in summary execute an action when clicked with :kbd:`LMB`.
Operator buttons may be an icon, text, or text with an icon.

.. container:: lead

   .. clear


Checkboxes & Toggle Buttons
===========================

.. figure:: /images/interface_controls_buttons_buttons_checkbox.png
   :align: right
   :figwidth: 155px

   Checkboxes and Toggle buttons.

These controls are used to activate or deactivate options.
Use :kbd:`LMB` to change their state. A tick is shown on checkboxes when
the option is activated. Active status on toggle buttons is indicated
either by color on the icon background, or a change in icon graphics.

Use :kbd:`Ctrl-Wheel` to cycle through on/off states.


Dragging
--------

To change many values at once on or off, you can press down
:kbd:`LMB` and drag over multiple buttons.


.. _ui-direction-button:

Direction Buttons
=================

.. figure:: /images/interface_controls_buttons_buttons_direction.png
   :align: right

   Direction buttons.

Clicking with :kbd:`LMB` in the sphere and dragging the mouse cursor
lets the user change the direction by rotating the sphere.


Shortcuts
---------

- :kbd:`LMB` (drag) rotates the direction.
- :kbd:`Ctrl` (while dragging) snaps to vertical & diagonal directions.
