diff options
Diffstat (limited to 'release/scripts/modules/bpy_extras/object_utils.py')
-rw-r--r-- | release/scripts/modules/bpy_extras/object_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py index 8f2e69313fc..eb0123f12eb 100644 --- a/release/scripts/modules/bpy_extras/object_utils.py +++ b/release/scripts/modules/bpy_extras/object_utils.py @@ -120,14 +120,14 @@ def object_data_add(context, obdata, operator=None, name=None): :rtype: :class:`bpy.types.Object` """ scene = context.scene - layer = context.render_layer + layer = context.view_layer layer_collection = context.layer_collection for ob in layer.objects: ob.select_set(action='DESELECT') if not layer_collection: - # when there is no collection linked to this render_layer create one + # when there is no collection linked to this view_layer create one scene_collection = scene.master_collection.collections.new("") layer_collection = layer.collections.link(scene_collection) else: |