Hi folks. I’m just starting out with Python in Blender (and in general) so I’m starting small and just trying to write a script that joins vertices with edges, and thought I’d try playing with the new feature of modifying more than one object in edit mode. I thought I try to connect a vertex from the the default cube to a plane, but I 'm not sure what the right (and generalised) way to get references to each selected object in edit mode is. From looking at the Blender Python documentation for 2.79, the recommended way looks to have been C.edit_object. The documentation says to pass this to a bmesh constructor to be able to fiddle with the vertices and edges etc.
If I use the same thing in the build I’m using of 2.8, however, I only see a single object listed when I check the C.edit_object property when I have two objects selected in edit mode. I used C.dir() to have a look for other properties that might provide what I’m looking for and I found C.objects_in_mode, but I’m not sure if it’s supposed to be used for what I’m looking for. To test it out, I added a cone to the scene (in object mode) and then made sure I selected only the cube and the plane and switched back to edit mode so it was the same as before, but now contained an unselected cone. I used C.objects_in_mode it it did list the plane and the cube without the cone, but the thing that makes me unsure that this property is what I’m looking for is that when I check the same property from object mode, it just returns and empty list.
My understanding of the documentation is that bpy.context is intended to provide information about the various modes that might be used, so I’d expect this propery to list all 3 objects in object mode, but the fact that it just returns an emty list in object mode makes me think I must me barking up the wrong tree. Does anyone have any suggestions about what I’m doing wrong or know which page of the Blender Python manual I should be reading to do figure this out?