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.)...
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user