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
path: root/tests
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-02 17:53:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-02 18:11:47 +0300
commitae28ceb9d86e9db702d968ed779e9bb2b2d31a08 (patch)
tree780a78e6c6790cce48a55ba30babab436aa98280 /tests
parent05b685989b5288bcfdc5bd4ae5c387a1da4dd58e (diff)
Fix swapped x/y in event simulation script
Incorrect area center calculation, also correct comments.
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_run_operators_event_simulate.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/python/bl_run_operators_event_simulate.py b/tests/python/bl_run_operators_event_simulate.py
index e536b9da2b1..251d27fce90 100644
--- a/tests/python/bl_run_operators_event_simulate.py
+++ b/tests/python/bl_run_operators_event_simulate.py
@@ -31,7 +31,7 @@ Possible use cases for this script include:
- Creating reproducible user interactions for the purpose of benchmarking and profiling.
- Note that curse-motion actions report the update time between events
+ Note that cursor-motion actions report the update time between events
which can be helpful when measuring optimizations.
- As a convenient way to replay interactive actions that reproduce a bug.
@@ -86,7 +86,7 @@ Sculpt stroke:
'event(type="WHEELDOWNMOUSE", value="TAP", repeat=2)' \
'event(type="LEFTMOUSE", value="PRESS")' \
'cursor_motion(path="CIRCLE", radius=300, steps=100, repeat=5)' \
- 'event(type="LEFTMOUSE", value="RELEASE")' \
+ 'event(type="LEFTMOUSE", value="RELEASE")'
Implementation
@@ -245,8 +245,8 @@ class action_handlers:
if area is None:
raise ArgumentTypeError("Area with ui_type=%r not found" % ui_type)
- x = area.y + (area.width // 2)
- y = area.x + (area.height // 2)
+ x = area.x + (area.width // 2)
+ y = area.y + (area.height // 2)
yield dict(type='MOUSEMOVE', value='NOTHING', x=x, y=y)
yield dict(type='SPACE', value='TAP', ctrl=True, alt=True)
@@ -549,8 +549,8 @@ def main_event_iter(*, action_list):
"""
area = find_main_area()
- x_init = area.y + (area.width // 2)
- y_init = area.x + (area.height // 2)
+ x_init = area.x + (area.width // 2)
+ y_init = area.y + (area.height // 2)
yield dict(type='MOUSEMOVE', value='NOTHING', x=x_init, y=y_init)