Skip to main content
added 65 characters in body
Source Link
batFINGER
  • 85.2k
  • 10
  • 114
  • 244

Since you're using something from bpy.ops, you need to get the editor state right (this is the failing of most of bpy.ops).

You probably need to set bpy.context.scene.objects.active = target

and in 2.8+

context.view_layer.objects.active = target

Since you're using something from bpy.ops, you need to get the editor state right (this is the failing of most of bpy.ops).

You probably need to set bpy.context.scene.objects.active = target

Since you're using something from bpy.ops, you need to get the editor state right (this is the failing of most of bpy.ops).

You probably need to set bpy.context.scene.objects.active = target

and in 2.8+

context.view_layer.objects.active = target
added 6 characters in body
Source Link
CodeManX
  • 29.7k
  • 3
  • 92
  • 131

Since you're using something from bpy.opsbpy.ops, you need to get the editor state right (this is the failing of most of bpy.opsbpy.ops). You

You probably need to set bpy.context.scene.objects.active = target

Since you're using something from bpy.ops, you need to get the editor state right (this is the failing of most of bpy.ops). You probably need to set bpy.context.scene.objects.active = target

Since you're using something from bpy.ops, you need to get the editor state right (this is the failing of most of bpy.ops).

You probably need to set bpy.context.scene.objects.active = target

Source Link
Mutant Bob
  • 9.3k
  • 2
  • 30
  • 58

Since you're using something from bpy.ops, you need to get the editor state right (this is the failing of most of bpy.ops). You probably need to set bpy.context.scene.objects.active = target