Error in looptri update, was checking wrong layer-type

This commit is contained in:
Campbell Barton 2015-07-27 21:10:04 +10:00
parent 76beb7b7d4
commit 15676bcc85
2 changed files with 1 additions and 2 deletions

View File

@ -1602,7 +1602,7 @@ static void dm_ensure_display_normals(DerivedMesh *dm)
/* BLI_assert((CustomData_has_layer(&dm->polyData, CD_NORMAL) == false)); */
if ((dm->type == DM_TYPE_CDDM) &&
((dm->dirty & DM_DIRTY_NORMALS) || CustomData_has_layer(&dm->faceData, CD_NORMAL) == false))
((dm->dirty & DM_DIRTY_NORMALS) || CustomData_has_layer(&dm->polyData, CD_NORMAL) == false))
{
/* if normals are dirty we want to calculate vertex normals too */
CDDM_calc_normals_mapping_ex(dm, (dm->dirty & DM_DIRTY_NORMALS) ? false : true);

View File

@ -1562,7 +1562,6 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
const MLoopTri *mlooptri = dm->getLoopTriArray(dm);
ImgSeqFormatData *f_data = (ImgSeqFormatData *)sData->format_data;
int samples = (surface->flags & MOD_DPAINT_ANTIALIAS) ? 5 : 1;
// should this be replaced by CD_MLOOPCOL?
MLoopCol *col = CustomData_get_layer_named(&dm->loopData, CD_MLOOPCOL, surface->init_layername);
if (!col) return;