This: create mesh then add vertices to it in python (see snippet below) used mesh.from_pydata(verts, edges, faces)
.
I would like to just create a mesh of vertices, no edges, no faces.
I would think I would delete:
edges = []
faces = [[0, 1, 2, 3]]
But what would I replace mesh.from_pydata(verts, edges, faces)
with?
import bpy
mesh = bpy.data.meshes.new("myBeautifulMesh") # add the new mesh
obj = bpy.data.objects.new(mesh.name, mesh)
col = bpy.data.collections.get("Collection")
col.objects.link(obj)
bpy.context.view_layer.objects.active = obj
verts = [( 1.0, 1.0, 0.0),
( 1.0, -1.0, 0.0),
(-1.0, -1.0, 0.0),
(-1.0, 1.0, 0.0),
] # 4 verts made with XYZ coords
edges = []
faces = [[0, 1, 2, 3]]
mesh.from_pydata(verts, edges, faces)