[Bf-blender-cvs] [5e66827] master: Fix T44842: Modal Timer (template) should return {'CANCELLED'} when cancelled!

Bastien Montagne noreply at git.blender.org
Mon May 25 17:44:04 CEST 2015


Commit: 5e66827029b8964fa969dc033df8dbece89cdf2e
Author: Bastien Montagne
Date:   Mon May 25 17:42:10 2015 +0200
Branches: master
https://developer.blender.org/rB5e66827029b8964fa969dc033df8dbece89cdf2e

Fix T44842: Modal Timer (template) should return {'CANCELLED'} when cancelled!

===================================================================

M	release/scripts/templates_py/operator_modal_timer.py

===================================================================

diff --git a/release/scripts/templates_py/operator_modal_timer.py b/release/scripts/templates_py/operator_modal_timer.py
index 4d36860..df4d10e 100644
--- a/release/scripts/templates_py/operator_modal_timer.py
+++ b/release/scripts/templates_py/operator_modal_timer.py
@@ -10,7 +10,8 @@ class ModalTimerOperator(bpy.types.Operator):
 
     def modal(self, context, event):
         if event.type in {'RIGHTMOUSE', 'ESC'}:
-            return self.cancel(context)
+            self.cancel(context)
+            return {'CANCELLED'}
 
         if event.type == 'TIMER':
             # change theme color, silly!




More information about the Bf-blender-cvs mailing list