Fix T59774: Lightmap Pack Error: Element-wise multiplication: not supported between 'Quaternion' and 'Vector' types.

This commit is contained in:
Bastien Montagne 2018-12-28 10:37:54 +01:00
parent fdc726eb61
commit 1e935b090b
Notes: blender-bot 2023-02-14 04:20:38 +01:00
Referenced by issue #59774, Lightmap Pack Error: Element-wise multiplication: not supported between 'Quaternion' and 'Vector' types
1 changed files with 2 additions and 2 deletions

View File

@ -107,12 +107,12 @@ class prettyface:
no = data.normal
r = no.rotation_difference(mathutils.Vector((0.0, 0.0, 1.0)))
cos_2d = [(r * co).xy for co in cos]
cos_2d = [(r @ co).xy for co in cos]
# print(cos_2d)
angle = mathutils.geometry.box_fit_2d(cos_2d)
mat = mathutils.Matrix.Rotation(angle, 2)
cos_2d = [(mat * co) for co in cos_2d]
cos_2d = [(mat @ co) for co in cos_2d]
xs = [co.x for co in cos_2d]
ys = [co.y for co in cos_2d]