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
path: root/source
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2019-05-28 11:24:51 +0300
committerAntonioya <blendergit@gmail.com>2019-05-28 11:24:51 +0300
commit1cf27668b9c842f7d2a00f1bceacdb362ac88ff1 (patch)
tree517765f93c25ed28998dc921223ca876d8404edd /source
parent1008d9c73567780ec22bea6a0b27f57e60ea403d (diff)
Fix T65212: Cycles_render_layer test grease pencil crashes.
Theme colors should not be accessed for rendering. Also some minor cleanups. Thanks @brecht for catching the bug.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 280702020df..aa5ad3ebdb4 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -1020,19 +1020,21 @@ void GPENCIL_draw_scene(void *ved)
GPU_framebuffer_bind(fbl->main);
}
/* tonemapping */
- stl->storage->tonemapping = stl->storage->is_render ? 1 : 0;
-
+ stl->storage->tonemapping = is_render ? 1 : 0;
/* active select flag and selection color */
+ if (!is_render) {
+ UI_GetThemeColorShadeAlpha4fv(
+ (ob == draw_ctx->obact) ? TH_ACTIVE : TH_SELECT, 0, -40, stl->storage->select_color);
+ }
stl->storage->do_select_outline = ((overlay) && (ob->base_flag & BASE_SELECTED) &&
(ob->mode == OB_MODE_OBJECT) && (!is_render) &&
(!playing) && (v3d->flag & V3D_SELECT_OUTLINE));
/* if active object is not object mode, disable for all objects */
- if ((draw_ctx->obact) && (draw_ctx->obact->mode != OB_MODE_OBJECT)) {
+ if ((stl->storage->do_select_outline) && (draw_ctx->obact) &&
+ (draw_ctx->obact->mode != OB_MODE_OBJECT)) {
stl->storage->do_select_outline = 0;
}
- UI_GetThemeColorShadeAlpha4fv(
- (ob == draw_ctx->obact) ? TH_ACTIVE : TH_SELECT, 0, -40, stl->storage->select_color);
/* draw mix pass */
DRW_draw_pass(psl->mix_pass);