operator consistent

given: object A is selected, object B is active


effects object A



effects object B

do i need to do a

    bpy.data.objects[...].select = True
    bpy.context.scene.objects.active = ...

so i can be sure EVERY operator will effect the desired object?


This is the same as when you do it ‘by hand’ rather than using the Python API. The general rule of thumb is that anything that can apply to multiple objects works on all those currently selected, while anything that can only apply to one object works on the active one.

Best wishes,

if you wanna make sure that only 1 object will be affected, you could

  • deselect everything
  • select the single object
  • make that object active