diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-19 11:48:37 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-19 11:48:37 +0300 |
commit | b09a8203e98ebdae78d325453641f33a608cfaaa (patch) | |
tree | 96431e9f164db93657486704d83c3d627eedf044 /source/blender/editors/sculpt_paint/paint_image_proj.c | |
parent | 64a2f9806238464895c726af9a96760377b3ebb6 (diff) |
Cleanup DM generation code for ProjPaint.
Two branches were actually doing essentially the same thing here, no
need to artificially complicate things. ;)
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 6a37b3df47f..2ecd6500fdf 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3428,20 +3428,13 @@ static bool proj_paint_state_dm_init(ProjPaintState *ps) /* Workaround for subsurf selection, try the display mesh first */ if (ps->source == PROJ_SRC_IMAGE_CAM) { /* using render mesh, assume only camera was rendered from */ - ps->dm = mesh_create_derived_render(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE); + ps->dm = mesh_create_derived_render(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MLOOPUV | CD_MASK_MTFACE); ps->dm_release = true; } - else if (ps->ob->derivedFinal && - CustomData_has_layer(&ps->ob->derivedFinal->loopData, CD_MLOOPUV) && - (ps->do_face_sel == false || CustomData_has_layer(&ps->ob->derivedFinal->polyData, CD_ORIGINDEX))) - { - ps->dm = ps->ob->derivedFinal; - ps->dm_release = false; - } else { ps->dm = mesh_get_derived_final( ps->scene, ps->ob, - ps->scene->customdata_mask | CD_MASK_MTFACE | (ps->do_face_sel ? CD_ORIGINDEX : 0)); + ps->scene->customdata_mask | CD_MASK_MLOOPUV | CD_MASK_MTFACE | (ps->do_face_sel ? CD_ORIGINDEX : 0)); ps->dm_release = false; } |