diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-07-05 16:40:48 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-07-05 16:40:48 +0300 |
commit | 3c7814d7debd8435bf3cae91123794f1ef1b69fd (patch) | |
tree | 0da2dc43ee408ab58c94b75a1de7202fe87def81 /source | |
parent | d1349bd0c7da2993b408bfd9a8eda0ab802272ed (diff) |
Workbench: Disable texture paint drawing for final render
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_deferred.c | 4 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_forward.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c index 8c9dc43afa8..f7ce1acfd27 100644 --- a/source/blender/draw/engines/workbench/workbench_deferred.c +++ b/source/blender/draw/engines/workbench/workbench_deferred.c @@ -1026,7 +1026,9 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob) const int materials_len = MAX2(1, ob->totcol); const Mesh *me = (ob->type == OB_MESH) ? ob->data : NULL; bool has_transp_mat = false; - const bool use_texture_paint_drawing = workbench_is_object_in_texture_paint_mode(ob) && me && + const bool use_texture_paint_drawing = !(DRW_state_is_image_render() && + draw_ctx->v3d == NULL) && + workbench_is_object_in_texture_paint_mode(ob) && me && me->mloopuv; if (use_texture_paint_drawing) { diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c index 5e8cbf71c1e..4c1fce550e8 100644 --- a/source/blender/draw/engines/workbench/workbench_forward.c +++ b/source/blender/draw/engines/workbench/workbench_forward.c @@ -628,7 +628,9 @@ void workbench_forward_cache_populate(WORKBENCH_Data *vedata, Object *ob) const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d); const int materials_len = MAX2(1, ob->totcol); const Mesh *me = (ob->type == OB_MESH) ? ob->data : NULL; - const bool use_texture_paint_drawing = workbench_is_object_in_texture_paint_mode(ob) && me && + const bool use_texture_paint_drawing = !(DRW_state_is_image_render() && + draw_ctx->v3d == NULL) && + workbench_is_object_in_texture_paint_mode(ob) && me && me->mloopuv; if (use_texture_paint_drawing) { |