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:
authorJeroen Bakker <jeroen@blender.org>2020-01-14 13:01:15 +0300
committerJeroen Bakker <jeroen@blender.org>2020-01-14 13:03:45 +0300
commit9954cbfca6df738341f67ada2bf5cb55f897549d (patch)
treed9b641a8f12b15e443a2026e02e789f499295095 /source
parent1e0b7903649f69295d1b842d05e015676098ac12 (diff)
Fix T72063: Workbench Sculpt Render
When sculpting and doing a image render the workbench used the sculpt batch what is created by a different GPU context and would not show up. In debug builds an assert for this case is checked. I rechecked all `use_sculpt_pbvh` that it also checked if it was rendering. Only the workbench deferred didn't do this for the default render mode. With this change the user can render a workbench render directly from sculpt mode.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/workbench/workbench_deferred.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c
index 02a3af7fa73..8bc4ae2e101 100644
--- a/source/blender/draw/engines/workbench/workbench_deferred.c
+++ b/source/blender/draw/engines/workbench/workbench_deferred.c
@@ -1027,7 +1027,8 @@ void workbench_deferred_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob)
WORKBENCH_MaterialData *material;
if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL)) {
const bool is_active = (ob == draw_ctx->obact);
- const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d);
+ const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) &&
+ !DRW_state_is_image_render();
const bool use_hide = is_active && DRW_object_use_hide_faces(ob);
const int materials_len = MAX2(1, ob->totcol);
const Mesh *me = (ob->type == OB_MESH) ? ob->data : NULL;