2

I'm new scripting Blender but I could write the following:

import bpy
obj_name = "maki"
mesh_data = bpy.data.meshes.new(obj_name + "_data")
obj = bpy.data.objects.new(obj_name, mesh_data)
bpy.context.scene.objects.link(obj)
# Sample vertex data
verts = [(0.154, 0.5151, 2.213), (2.847, -3.15, 0.151), (1.247, -1.105, 0.965)]
mesh_data.from_pydata(verts, [], [])

Is this the right way to do that?

Prag
  • 1,038
  • 6
  • 15
  • 32

0 Answers0