[Bf-blender-cvs] [98d3a16281b] master: Fix (unreported) Freestyle modifiers element-wise multiplication error

Philipp Oeser noreply at git.blender.org
Mon Sep 9 10:50:06 CEST 2019


Commit: 98d3a16281b6da873eb07055c565df6976d5adec
Author: Philipp Oeser
Date:   Mon Sep 9 10:46:25 2019 +0200
Branches: master
https://developer.blender.org/rB98d3a16281b6da873eb07055c565df6976d5adec

Fix (unreported) Freestyle modifiers element-wise multiplication error

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

M	release/scripts/startup/bl_operators/freestyle.py

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

diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py
index 35fb0ab315c..baac3556fb2 100644
--- a/release/scripts/startup/bl_operators/freestyle.py
+++ b/release/scripts/startup/bl_operators/freestyle.py
@@ -113,17 +113,17 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
             max_dist = -min_dist
             if m.type == 'DISTANCE_FROM_CAMERA':
                 for ob in selection:
-                    ob_to_cam = matrix_to_camera * ob.matrix_world
+                    ob_to_cam = matrix_to_camera @ ob.matrix_world
                     for vert in ob.data.vertices:
                         # dist in the camera space
-                        dist = (ob_to_cam * vert.co).length
+                        dist = (ob_to_cam @ vert.co).length
                         min_dist = min(dist, min_dist)
                         max_dist = max(dist, max_dist)
             elif m.type == 'DISTANCE_FROM_OBJECT':
                 for ob in selection:
                     for vert in ob.data.vertices:
                         # dist in the world space
-                        dist = (ob.matrix_world * vert.co - target_location).length
+                        dist = (ob.matrix_world @ vert.co - target_location).length
                         min_dist = min(dist, min_dist)
                         max_dist = max(dist, max_dist)
             # Fill the Range Min/Max entries with the computed distances



More information about the Bf-blender-cvs mailing list