diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-06-25 21:23:16 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-06-25 21:23:16 +0300 |
commit | 1e73c400a7b300dbbec58cd7f33c2970652ad23c (patch) | |
tree | 1cb47f687af19e30113d3cbf857267653f86cbb5 /source/blender/blenkernel/intern/subsurf_ccg.c | |
parent | 7f8df735ae89b36086b3aa555ad50a656d1a4764 (diff) | |
parent | 2cdcb1c1716180c00c23feb8332f17c2bab74864 (diff) |
Merge branch 'master' into gooseberry
Conflicts:
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/makesrna/intern/rna_nodetree.c
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf_ccg.c')
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 16f218d5fb6..f505533b6c6 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2534,7 +2534,8 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm, CCGDerivedMesh *ccgdm = (CCGDerivedMesh *) dm; CCGSubSurf *ss = ccgdm->ss; CCGKey key; - MCol *mcol = dm->getTessFaceDataArray(dm, CD_PREVIEW_MCOL); + int colType = CD_TEXTURE_MCOL; + MCol *mcol = dm->getTessFaceDataArray(dm, colType); MTFace *tf = DM_get_tessface_data_layer(dm, CD_MTFACE); MTFace *tf_stencil_base = NULL; MTFace *tf_stencil = NULL; @@ -2552,11 +2553,14 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm, CCG_key_top_level(&key, ss); ccgdm_pbvh_update(ccgdm); - if (!mcol) - mcol = dm->getTessFaceDataArray(dm, CD_MCOL); - - if (!mcol) - mcol = dm->getTessFaceDataArray(dm, CD_TEXTURE_MCOL); + if (!mcol) { + colType = CD_PREVIEW_MCOL; + mcol = dm->getTessFaceDataArray(dm, colType); + } + if (!mcol) { + colType = CD_MCOL; + mcol = dm->getTessFaceDataArray(dm, colType); + } totface = ccgSubSurf_getNumFaces(ss); |