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:
authorPhilipp Oeser <info@graphics-engineer.com>2018-11-16 14:09:41 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-11-16 14:10:35 +0300
commit20963a6a06c2b77d0f012bc3826da10822b11d5e (patch)
tree67d0d2b24782b3499b21d5afdc7656d667e62c8e /release/scripts/templates_py
parent50ba4762f685996614f6585183fbe8085b89f27d (diff)
PyTemplates operator_modal_view3d_raycast: update to blender2.8 (*/@)
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r--release/scripts/templates_py/operator_modal_view3d_raycast.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/templates_py/operator_modal_view3d_raycast.py b/release/scripts/templates_py/operator_modal_view3d_raycast.py
index 103c13dc1c2..4b9700dd3fe 100644
--- a/release/scripts/templates_py/operator_modal_view3d_raycast.py
+++ b/release/scripts/templates_py/operator_modal_view3d_raycast.py
@@ -37,8 +37,8 @@ def main(context, event):
# get the ray relative to the object
matrix_inv = matrix.inverted()
- ray_origin_obj = matrix_inv * ray_origin
- ray_target_obj = matrix_inv * ray_target
+ ray_origin_obj = matrix_inv @ ray_origin
+ ray_target_obj = matrix_inv @ ray_target
ray_direction_obj = ray_target_obj - ray_origin_obj
# cast the ray
@@ -57,7 +57,7 @@ def main(context, event):
if obj.type == 'MESH':
hit, normal, face_index = obj_ray_cast(obj, matrix)
if hit is not None:
- hit_world = matrix * hit
+ hit_world = matrix @ hit
scene.cursor_location = hit_world
length_squared = (hit_world - ray_origin).length_squared
if best_obj is None or length_squared < best_length_squared: