I want to use this add-on, so the Python code has to be Single line https://github.com/InamuraJIN/CommandRecorder
I was able to select Empty in this Python
bpy.ops.object.select_pattern(pattern="Empty")
However, this command does not select the object in Python as active
I don't want it Python allowed me to select objects with matching names But it's not Active Select.
I want to do.
Active selection of the currently selected object + specified Name Object
I use Google Translate
bpy.context.selected_objectsand filter the selection by type viaObject.type: https://blender.stackexchange.com/questions/132825/python-selecting-object-by-name-in-2-8/132829#132829 Alternatively: https://blender.stackexchange.com/questions/125114/how-to-get-the-class-of-selected-object-in-blender-2-8 Does that help? Otherwise please take your time, edit your question and explain in detail what you'd like to achieve. – brockmann Jul 09 '20 at 18:20ViewLayer. Did you already tried:bpy.context.view_layer.objects.active = bpy.context.scene.objects.get("Cube")as suggested in the answer I've linked to? Also, if you'd like to join objects you can override the operator: https://blender.stackexchange.com/a/133024/31447 so no need to set the active object... – brockmann Jul 10 '20 at 12:03bpy.context.scene.objects.get("Cube").select_set(True)depending on what you do... – brockmann Jul 10 '20 at 13:35