Cleanup DM generation code for ProjPaint.
Two branches were actually doing essentially the same thing here, no need to artificially complicate things. ;)
This commit is contained in:
parent
64a2f98062
commit
b09a8203e9
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue