diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-09-12 15:14:40 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-09-12 19:23:36 +0300 |
commit | 5b2cebf49bc6e17fd75ab43e33387fc1b257d710 (patch) | |
tree | 61244ecce693023a834cb655ae96d3e062ee1e68 /source/blender/draw/engines/select/select_engine.c | |
parent | 2ea82e86ca60c1c268c6074ecba10524cebd97ed (diff) |
Fix T69752: Texture paint sampling colors always 'merged down'
Rgression from rBaf4dcc6073fa.
paint_sample_color > imapaint_pick_face uses the the selection buffer
(DRW_select_buffer_sample_point) and to get flat colors [select_id_flat] we
need to be in SCE_SELECT_FACE mode. This was already fine if you had
'Face Selection Masking' turned on, but got colors including lighting
when turned of [select_id_uniform].
There was already an exception in 'select_cache_init' that turns on
SCE_SELECT_FACE for weightpaint, we just need this for texture paint
(vertex paint) as well... Also moved the logic into
select_id_get_object_select_mode.
Note we were also asserting here:
BLI_assert failed: /blender/source/blender/draw/engines/select/
select_engine.c:174, select_cache_init(), at 'e_data.context.select_mode
!= 0'
Note also this is not working correctly for vertexpaint (yet), but has
been discussed in T69752 and there is a solution by @mano-wii in P1032.
Reviewers: mano-wii
Subscribers: mano-wii
Maniphest Tasks: T69752
Differential Revision: https://developer.blender.org/D5775
Diffstat (limited to 'source/blender/draw/engines/select/select_engine.c')
-rw-r--r-- | source/blender/draw/engines/select/select_engine.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c index c294bba2083..5dc20a589f0 100644 --- a/source/blender/draw/engines/select/select_engine.c +++ b/source/blender/draw/engines/select/select_engine.c @@ -163,13 +163,6 @@ static void select_cache_init(void *vedata) if (e_data.context.select_mode == -1) { e_data.context.select_mode = select_id_get_object_select_mode(draw_ctx->scene, draw_ctx->obact); - if (e_data.context.select_mode == 0) { - /* Need for sampling weights. */ - if (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) { - e_data.context.select_mode = SCE_SELECT_FACE; - } - } - BLI_assert(e_data.context.select_mode != 0); } |