I have a vector and vertices, and I'm trying to align the vertices to that vector using 'Translation Matrix', unfortunately multiplying the matrix with the vertices' coordinates do not change anything.
here is the code:
import bpy
import bmesh
import mathutils
import math
msh = bpy.context.object.data
mesh = bmesh.from_edit_mesh(bpy.context.active_object.data)
vec = mathutils.Vector((0.7071, -0.7071, 0.0, 1.0))
trans = mathutils.Matrix.Translation(vec)
m1 = mesh.verts.new((1, 0, 0))
m2 = mesh.verts.new((1.5, 0, 0))
m3 = mesh.verts.new((2, 0, 0))
m1.co = m1.co * trans
m2.co = m2.co * trans
m3.co = m3.co * trans
bmesh.update_edit_mesh(msh)
Thanks in advance.