Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-02-02 08:06:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-02 08:48:44 +0300
commit9afab7098519e5044664580dc1c3117918549383 (patch)
tree4f71ad11dde897d8936cfff3351dfbe8347a7d4d /source/blender/blenkernel
parent3b92a9472c4cee8df98eb79e6be6b2f8b14c8b59 (diff)
Partial Fix T47221: Sculpt Hide fails w/ texture drawing
Support for skipping hidden faces in sculpt mode w/ texture drawing.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 90269724db6..0d3848f9787 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -498,7 +498,8 @@ static void cdDM_drawFacesTex_common(
const MLoopCol *mloopcol;
int i;
int colType, start_element, tot_drawn;
- bool use_tface = (uvflag & DM_DRAW_USE_ACTIVE_UV) != 0;
+ const bool use_hide = (uvflag & DM_DRAW_SKIP_HIDDEN) != 0;
+ const bool use_tface = (uvflag & DM_DRAW_USE_ACTIVE_UV) != 0;
int totpoly;
int next_actualFace;
int mat_index;
@@ -570,7 +571,10 @@ static void cdDM_drawFacesTex_common(
if (i != totpoly - 1)
next_actualFace = bufmat->polys[i + 1];
- if (drawParams) {
+ if (use_hide && (mpoly[actualFace].flag & ME_HIDE)) {
+ draw_option = DM_DRAW_OPTION_SKIP;
+ }
+ else if (drawParams) {
MTexPoly *tp = use_tface && mtexpoly ? &mtexpoly[actualFace] : NULL;
draw_option = drawParams(tp, (mloopcol != NULL), mpoly[actualFace].mat_nr);
}