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:
authorCampbell Barton <ideasman42@gmail.com>2010-09-09 22:03:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-09 22:03:57 +0400
commit111965478a9fe671a827ed2a495b83fa3a100aeb (patch)
treed225ba52910a1f4b8f7152aa5a716ffad372be55 /release/scripts/templates/operator_modal.py
parent7bd1f9a234aa0adeecc3ec8e77eead598b5af232 (diff)
replace self.properties.foo --> self.foo
Diffstat (limited to 'release/scripts/templates/operator_modal.py')
-rw-r--r--release/scripts/templates/operator_modal.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/templates/operator_modal.py b/release/scripts/templates/operator_modal.py
index 1e88ef3a3f6..522f9fea050 100644
--- a/release/scripts/templates/operator_modal.py
+++ b/release/scripts/templates/operator_modal.py
@@ -11,14 +11,14 @@ class ModalOperator(bpy.types.Operator):
def modal(self, context, event):
if event.type == 'MOUSEMOVE':
- delta = self.properties.first_mouse_x - event.mouse_x
- context.object.location.x = self.properties.first_value + delta * 0.01
+ delta = self.first_mouse_x - event.mouse_x
+ context.object.location.x = self.first_value + delta * 0.01
elif event.type == 'LEFTMOUSE':
return {'FINISHED'}
elif event.type in ('RIGHTMOUSE', 'ESC'):
- context.object.location.x = self.properties.first_value
+ context.object.location.x = self.first_value
return {'CANCELLED'}
return {'RUNNING_MODAL'}
@@ -26,8 +26,8 @@ class ModalOperator(bpy.types.Operator):
def invoke(self, context, event):
if context.object:
context.window_manager.add_modal_handler(self)
- self.properties.first_mouse_x = event.mouse_x
- self.properties.first_value = context.object.location.x
+ self.first_mouse_x = event.mouse_x
+ self.first_value = context.object.location.x
return {'RUNNING_MODAL'}
else:
self.report({'WARNING'}, "No active object, could not finish")