I am new to blender and python and try to get the hang of it. PS: Everything should be achieved via python script.
I want to create a low poly model via ico-sphere. That's really easy because I just need to create a ico-sphere. Now I want to randomly select a face and one of his neighbours to merge them via bpy.ops.mesh.edge_face_add() to a new face.
I am having the following script:
bpy.ops.object.mode_set(mode = 'EDIT') # into edit mode bpy.ops.mesh.select_all(action='DESELECT') # deselect everything bpy.context.tool_settings.mesh_select_mode = (True , False , False) # only faces mesh=bmesh.from_edit_mesh(me) # get mesh mesh.faces.ensure_lookup_table() # update faces mesh.faces.select = True # select face number 0 mesh.faces.select = True # select face number 1 bpy.ops.mesh.edge_face_add() # merge them bpy.ops.mesh.select_all(action='DESELECT') # deselect everything
At first I am using bmesh which is experimental. I would like to use a blender api which isn't experimental. Any ideas? I tried it with faces and 1 and it worked, they are neighbours. But I think that's not always. How can I find out which faces are next to faces for example.
Thanks for helping!