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 'release/scripts/templates_py/operator_modal_timer.py')
-rw-r--r--release/scripts/templates_py/operator_modal_timer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/templates_py/operator_modal_timer.py b/release/scripts/templates_py/operator_modal_timer.py
index 19c003712ad..3e205010549 100644
--- a/release/scripts/templates_py/operator_modal_timer.py
+++ b/release/scripts/templates_py/operator_modal_timer.py
@@ -31,14 +31,17 @@ class ModalTimerOperator(bpy.types.Operator):
wm = context.window_manager
wm.event_timer_remove(self._timer)
+
def menu_func(self, context):
self.layout.operator(ModalTimerOperator.bl_idname, text=ModalTimerOperator.bl_label)
+
def register():
bpy.utils.register_class(ModalTimerOperator)
bpy.types.VIEW3D_MT_view.append(menu_func)
-# Register and add to the "view" menu (required to also use F3 search "Modal Timer Operator" for quick access)
+
+# Register and add to the "view" menu (required to also use F3 search "Modal Timer Operator" for quick access).
def unregister():
bpy.utils.unregister_class(ModalTimerOperator)
bpy.types.VIEW3D_MT_view.remove(menu_func)