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:
authorCampbell Barton <ideasman42@gmail.com>2021-04-30 08:16:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-30 08:16:04 +0300
commit5a40c7952007a59bab2ae952d31885e6814c713e (patch)
tree5a325210dc219538e81801716e32d841ba8325c2 /source/blender/editors/screen
parenta9a048c726c1f8bbd99f711f93d28ea37027728a (diff)
parent2ed847317e7da8de86846766c54f40c5ee7cee73 (diff)
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 5b371ed2caa..eadc18de443 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -141,6 +141,14 @@ bool ED_operator_screenactive(bContext *C)
return true;
}
+bool ED_operator_screenactive_nobackground(bContext *C)
+{
+ if (G.background) {
+ return false;
+ }
+ return ED_operator_screenactive(C);
+}
+
/* XXX added this to prevent anim state to change during renders */
static bool ED_operator_screenactive_norender(bContext *C)
{
@@ -4959,7 +4967,7 @@ static void SCREEN_OT_userpref_show(struct wmOperatorType *ot)
/* api callbacks */
ot->exec = userpref_show_exec;
- ot->poll = ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive_nobackground; /* Not in background as this opens a window. */
}
/** \} */
@@ -5036,7 +5044,7 @@ static void SCREEN_OT_drivers_editor_show(struct wmOperatorType *ot)
/* api callbacks */
ot->exec = drivers_editor_show_exec;
- ot->poll = ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive_nobackground; /* Not in background as this opens a window. */
}
/** \} */
@@ -5080,7 +5088,7 @@ static void SCREEN_OT_info_log_show(struct wmOperatorType *ot)
/* api callbacks */
ot->exec = info_log_show_exec;
- ot->poll = ED_operator_screenactive;
+ ot->poll = ED_operator_screenactive_nobackground;
}
/** \} */