Fix (unreported) Freestyle modifiers element-wise multiplication error
This commit is contained in:
@@ -113,17 +113,17 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
|
|||||||
max_dist = -min_dist
|
max_dist = -min_dist
|
||||||
if m.type == 'DISTANCE_FROM_CAMERA':
|
if m.type == 'DISTANCE_FROM_CAMERA':
|
||||||
for ob in selection:
|
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:
|
for vert in ob.data.vertices:
|
||||||
# dist in the camera space
|
# 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)
|
min_dist = min(dist, min_dist)
|
||||||
max_dist = max(dist, max_dist)
|
max_dist = max(dist, max_dist)
|
||||||
elif m.type == 'DISTANCE_FROM_OBJECT':
|
elif m.type == 'DISTANCE_FROM_OBJECT':
|
||||||
for ob in selection:
|
for ob in selection:
|
||||||
for vert in ob.data.vertices:
|
for vert in ob.data.vertices:
|
||||||
# dist in the world space
|
# 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)
|
min_dist = min(dist, min_dist)
|
||||||
max_dist = max(dist, max_dist)
|
max_dist = max(dist, max_dist)
|
||||||
# Fill the Range Min/Max entries with the computed distances
|
# Fill the Range Min/Max entries with the computed distances
|
||||||
|
Reference in New Issue
Block a user