diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-06 19:20:49 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-06 19:20:49 +0300 |
commit | 7b38df41ae8b2903eb65dc72e506ba0b0c58453d (patch) | |
tree | 61b841a5f634a1b6806688c1fb4b563b92b7e99a /doc | |
parent | aa9912ec045e3209bc87c48801fd955c59bd0908 (diff) |
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.)...
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) |