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/operator_modal.py')
-rw-r--r--release/scripts/templates/operator_modal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/templates/operator_modal.py b/release/scripts/templates/operator_modal.py
index 78dbd4c6b43..a428b097f82 100644
--- a/release/scripts/templates/operator_modal.py
+++ b/release/scripts/templates/operator_modal.py
@@ -18,7 +18,7 @@ class ModalOperator(bpy.types.Operator):
elif event.type == 'LEFTMOUSE':
return {'FINISHED'}
- elif event.type in ('RIGHTMOUSE', 'ESC'):
+ elif event.type in {'RIGHTMOUSE', 'ESC'}:
context.object.location.x = self.first_value
return {'CANCELLED'}
@@ -47,4 +47,4 @@ if __name__ == "__main__":
register()
# test call
- bpy.ops.object.modal_operator()
+ bpy.ops.object.modal_operator('INVOKE_DEFAULT')