diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-12-12 18:38:54 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-12-12 18:39:00 +0300 |
commit | 4e0291f185570b12abe82ce57ff38c4ae27aa2ac (patch) | |
tree | 3a3c695762574d5dee7b5d87c372fad12579de65 /release | |
parent | 10eb92035c9b8803a9ff2e80b2d026f03c67e4f9 (diff) |
Fix T59208: Error when loading reference/background image in edit mode
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index e4d9b6e2f79..ec900546954 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -884,6 +884,10 @@ class LoadImageAsEmpty: default=True ) + @classmethod + def poll(cls, context): + return context.mode == "OBJECT" + def invoke(self, context, event): context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'} |