My goal here is to select three vertices and manually create a face using bpy.ops.mesh.edge_face_add(). However, when I run the following code, no vertices are actually selected. I have been using this (How do I select specific vertices in blender using python script?) StackExchange question and answer to no avail. Sometimes my script will select one vertex, sometimes it will not. It never selects more than one. current_min_vert and the others are MeshVertex class objects, and should be equivalent to obj.data.vertices[n], where 'n' is any prescribed integer. Here is the code:
# Join meshes into one
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.join()
# Set selection mode
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_mode(type="VERT")
bpy.ops.mesh.select_all(action = 'DESELECT')
# Select vertices to form a triangle
bpy.ops.object.mode_set(mode = 'OBJECT')
current_min_vert_copy.select = True
current_min_vert.select = True
current_max_vert.select = True
bpy.ops.object.mode_set(mode = 'EDIT')
The following image is my end goal. The top right vertex is current_min_vert_copy, the bottom right is current_min_vert, and the bottom left is current_max_vert.
Any assistance is greatly appreciated.
current_min_vert
? The problem might lie here. $\endgroup$