Python API Docs: fix some examples

This commit is contained in:
2019-06-06 17:12:49 +02:00
parent 3abb1695cf
commit 3a7af37e28
17 changed files with 25 additions and 48 deletions

View File

@@ -99,10 +99,9 @@ bm.free()
# Add the mesh to the scene
scene = bpy.context.scene
obj = bpy.data.objects.new("Object", me)
scene.objects.link(obj)
bpy.context.collection.objects.link(obj)
# Select and make active
scene.objects.active = obj
obj.select = True
bpy.context.view_layer.objects.active = obj
obj.select_set(True)