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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-12-01 13:20:18 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-12-01 13:20:18 +0300
commit3bd057d47284d727dadb6fd826bf55143a00ad97 (patch)
tree81b2ec88c6b1dabf7a6482d19743c2071c6f0441 /source/blender/draw/modes/paint_texture_mode.c
parentbfcd25b313998d5d62e927f80a837555c5113de7 (diff)
Texture Paint: fix wireframe and hiding not working with subsurf.
The editflag field is only valid in the original mesh instance.
Diffstat (limited to 'source/blender/draw/modes/paint_texture_mode.c')
-rw-r--r--source/blender/draw/modes/paint_texture_mode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c
index 10b42c76b14..3be44a425f7 100644
--- a/source/blender/draw/modes/paint_texture_mode.c
+++ b/source/blender/draw/modes/paint_texture_mode.c
@@ -38,6 +38,8 @@
#include "DNA_mesh_types.h"
+#include "DEG_depsgraph_query.h"
+
extern char datatoc_common_globals_lib_glsl[];
extern char datatoc_paint_texture_vert_glsl[];
extern char datatoc_paint_texture_frag_glsl[];
@@ -288,10 +290,11 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob)
if ((ob->type == OB_MESH) && (draw_ctx->obact == ob)) {
/* Get geometry cache */
const Mesh *me = ob->data;
+ const Mesh *me_orig = DEG_get_original_object(ob)->data;
Scene *scene = draw_ctx->scene;
const bool use_surface = draw_ctx->v3d->overlay.texture_paint_mode_opacity != 0.0; //DRW_object_is_mode_shade(ob) == true;
const bool use_material_slots = (scene->toolsettings->imapaint.mode == IMAGEPAINT_MODE_MATERIAL);
- const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0;
+ const bool use_face_sel = (me_orig->editflag & ME_EDIT_PAINT_FACE_SEL) != 0;
bool ok = false;
if (use_surface) {