Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/python_api/examples/bpy.types.Operator.5.py')
-rw-r--r--doc/python_api/examples/bpy.types.Operator.5.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/python_api/examples/bpy.types.Operator.5.py b/doc/python_api/examples/bpy.types.Operator.5.py
index a0b4a6d6841..90c899f222e 100644
--- a/doc/python_api/examples/bpy.types.Operator.5.py
+++ b/doc/python_api/examples/bpy.types.Operator.5.py
@@ -55,11 +55,13 @@ class ModalOperator(bpy.types.Operator):
context.window_manager.modal_handler_add(self)
return {'RUNNING_MODAL'}
-# Only needed if you want to add into a dynamic menu
+
+# Only needed if you want to add into a dynamic menu.
def menu_func(self, context):
self.layout.operator(ModalOperator.bl_idname, text="Modal Operator")
-# Register and add to the object menu (required to also use F3 search "Modal Operator" for quick access)
+
+# Register and add to the object menu (required to also use F3 search "Modal Operator" for quick access).
bpy.utils.register_class(ModalOperator)
bpy.types.VIEW3D_MT_object.append(menu_func)