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>2018-09-07 23:51:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-07 23:51:02 +0300
commit9c441dcd73279878545ad4e6313e755078cd1daf (patch)
treec945c91077e65b3d15415aa78447ab5e83650c1c /release/scripts/templates_py
parent66d275f8d3d4e7821e940b4d0ccbd7aa9b1f5037 (diff)
Gizmo: update template to use matrix multiply
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r--release/scripts/templates_py/gizmo_operator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/templates_py/gizmo_operator.py b/release/scripts/templates_py/gizmo_operator.py
index d1eef09685d..bdd93785cb3 100644
--- a/release/scripts/templates_py/gizmo_operator.py
+++ b/release/scripts/templates_py/gizmo_operator.py
@@ -26,7 +26,7 @@ def main(context, plane_co, plane_no):
plane_dot = plane_no.dot(plane_co)
for v in bm.verts:
- co = matrix * v.co
+ co = matrix @ v.co
v.select = (plane_no.dot(co) > plane_dot)
bm.select_flush_mode()
@@ -150,14 +150,14 @@ class SelectSideOfPlaneGizmoGroup(GizmoGroup):
no_a = self.widget_dial.matrix_basis.col[1].xyz
no_b = Vector(op.plane_no)
- no_a = (no_a * self.view_inv).xy.normalized()
- no_b = (no_b * self.view_inv).xy.normalized()
+ no_a = (no_a @ self.view_inv).xy.normalized()
+ no_b = (no_b @ self.view_inv).xy.normalized()
return no_a.angle_signed(no_b)
def direction_set_cb(value):
op = SelectSideOfPlaneGizmoGroup.my_target_operator(context)
matrix_rotate = Matrix.Rotation(-value, 3, self.rotate_axis)
- no = matrix_rotate * self.widget_dial.matrix_basis.col[1].xyz
+ no = matrix_rotate @ self.widget_dial.matrix_basis.col[1].xyz
op.plane_no = no
op.execute(context)