diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/examples/bpy.types.Object.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/python_api/examples/bpy.types.Object.py b/doc/python_api/examples/bpy.types.Object.py index f141ac7ce0f..46f42c828d7 100644 --- a/doc/python_api/examples/bpy.types.Object.py +++ b/doc/python_api/examples/bpy.types.Object.py @@ -19,7 +19,7 @@ light_object = bpy.data.objects.new(name="New Light", object_data=light_data) # Link light object to the active collection of current view layer, # so that it'll appear in the current scene. -view_layer.collections.active.collection.objects.link(light_object) +view_layer.active_layer_collection.collection.objects.link(light_object) # Place light to a specified location. light_object.location = (5.0, 5.0, 5.0) |