Commit: b09a8203e98ebdae78d325453641f33a608cfaaa
Author: Bastien Montagne
Date:   Tue Jun 19 10:48:37 2018 +0200
Branches: master
https://developer.blender.org/rBb09a8203e98ebdae78d325453641f33a608cfaaa

Cleanup DM generation code for ProjPaint.

Two branches were actually doing essentially the same thing here, no
need to artificially complicate things. ;)

===================================================================

M       source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

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;
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to