Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_operators/object.py')
-rw-r--r--release/scripts/startup/bl_operators/object.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index e4f8daa9c4b..8463277e28c 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -914,7 +914,8 @@ class LoadImageAsEmpty:
align=('VIEW' if self.view_align else 'WORLD'),
)
- obj = context.active_object
+ view_layer = context.view_layer
+ obj = view_layer.objects.active
obj.data = image
obj.empty_display_size = 5.0
self.set_settings(context, obj)