</code><br> * <code> for o in sel: obj = bpy.data.objects.get(o) if obj: obj.select_set(True) bpy.ops.mesh.select_mode(type="EDGE")</code><br> * <code> return {'FINISHED'}</code><pre>* <code> def execute(self, context): The indentation is wrong, the "def execute(...)" starts one indent level, so everything below it, up to…
Wow, code pasting in this forum is totally messed up.Anyway, the correct indentation is this: def execute(self, context):<br> for o in sel:<br> obj = bpy.data.objects.get(o)<br> if obj:<br> obj.select_set(True)<br> bpy.ops.mesh.select_mode(type="EDGE")<br> return {'FINISHED'} Python doesn't use curly brackets, like C++ or…
I downloaded Blender 2.8 last week and was looking into adding my own scripts to custom keyboard hotkeys, but there are gaps in my understanding that the Blender documentation, or these conversations I found, isn't explaining well enough to a dumbass like me. If I use these three code lines, I can call the subobject mode…