diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-02 08:39:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-02 08:39:29 +0300 |
commit | eae486f5e6c79b7b31e276dfaea69d2ece7fbf7f (patch) | |
tree | dd8220e52333289fa538925a95367ae47a793e3d /doc | |
parent | cb23927c9b24d5b17e35c8682060cd6839337a12 (diff) | |
parent | 0d8bf4bf947d84cdfc6e2b221ddb03c7f8d2114b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/examples/bpy.types.Operator.5.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py index 310eeceadf3..c1a49a756a0 100644 --- a/doc/python_api/examples/bpy.types.Operator.5.py +++ b/doc/python_api/examples/bpy.types.Operator.5.py @@ -2,13 +2,14 @@ Modal Execution +++++++++++++++ -This operator defines a :class:`Operator.modal` function which running, -handling events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``. - -Grab, Rotate, Scale and Fly-Mode are examples of modal operators. -They are especially useful for interactive tools, -your operator can have its own state where keys toggle options as the operator -runs. +This operator defines a :class:`Operator.modal` function that will keep being +run to handle events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``. + +Modal operators run every time a new event is detected, such as a mouse click +or key press. Conversely, when no new events are detected, the modal operator +will not run. Modal operators are especially useful for interactive tools, an +operator can have its own state where keys toggle options as the operator runs. +Grab, Rotate, Scale, and Fly-Mode are examples of modal operators. :class:`Operator.invoke` is used to initialize the operator as being by returning ``{'RUNNING_MODAL'}``, initializing the modal loop. |