From 7b38df41ae8b2903eb65dc72e506ba0b0c58453d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 6 Nov 2018 17:20:49 +0100 Subject: Fix/cleanup RNA viewlayer API. RNA's ViewLayer would present 'first level' of layer collection as a list (collection property), when it is actually now only a single item, same as the scene's master collection. Note: did not try to update view_layer python tests, those are already fully broken for quiet some time I guess (they still assume view_layer.collections to be mutable e.g.)... --- doc/python_api/examples/bpy.types.Object.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') 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) -- cgit v1.2.3