Blender2.8より前の動かないコード

scene = bpy.conetxt.scene
scene.objects.link(obj) # 無くなった

collection = bpy.context.view_layer.collections.active.collection
collection.objects.link(obj)
obj.select = True # 無くなった
 
obj.select_set("SELECT")
# create
cube = bpy.data.objects.new(name = "New", object_data = bpy.data.meshes["Cube"])

# get
cube = bpy.data.objects["New"]

# link
bpy.context.scene.collection.objects.link(cube) # 2.80
bpy.context.scene.objects.link(cube) # 2.79