Skip to content

Instantly share code, notes, and snippets.

@takumikinjo
Last active August 29, 2015 14:04
Show Gist options
  • Save takumikinjo/213897ac72a56b3e5d34 to your computer and use it in GitHub Desktop.
Save takumikinjo/213897ac72a56b3e5d34 to your computer and use it in GitHub Desktop.
Example of Bpy with a plane object
data = bpy.data.objects['Plane'].data
data.vertices.add(1)
data.vertices[4].co.x=3
data.edges.add(2)
data.edges[4].vertices[0]=3
data.edges[4].vertices[1]=4
data.edges[5].vertices[0]=1
data.edges[5].vertices[1]=4
data.loops.add(3)
data.loops[4].vertex_index=1
data.loops[5].vertex_index=4
data.loops[6].vertex_index=3
data.polygons.add(1)
data.polygons[1].loop_start=4
data.polygons[1].loop_total=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment