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>2013-06-27 10:21:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-27 10:21:10 +0400
commit35e92f54a1cdf0458c9090821d0966ee21ed0bd7 (patch)
treefbb01c1f3dd903d648bb3853d5ef8b8d7424e1f3 /source/blender/editors/screen/screendump.c
parent929bba2bac25127a5b3eb61f67e7dae219064b30 (diff)
make screenshot poll for background mode.
Diffstat (limited to 'source/blender/editors/screen/screendump.c')
-rw-r--r--source/blender/editors/screen/screendump.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 527715cdbd3..b16721640da 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -254,6 +254,13 @@ static void screenshot_draw(bContext *UNUSED(C), wmOperator *op)
uiDefAutoButsRNA(layout, &ptr, screenshot_draw_check_prop, '\0');
}
+static int screenshot_poll(bContext *C)
+{
+ if (G.background)
+ return false;
+
+ return WM_operator_winactive(C);
+}
void SCREEN_OT_screenshot(wmOperatorType *ot)
{
@@ -266,7 +273,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
ot->exec = screenshot_exec;
ot->cancel = screenshot_cancel;
ot->ui = screenshot_draw;
- ot->poll = WM_operator_winactive;
+ ot->poll = screenshot_poll;
ot->flag = 0;