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
path: root/source
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-24 17:28:18 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-24 17:28:38 +0300
commitdc80ff9b56df7a509b62031f9e638347072ab927 (patch)
tree3254fbc4b3035031957f89d66be80096e3581d51 /source
parenta028575c4a613b5d87ec26434f8c846c60861cfe (diff)
Fix T45541 crash when mixing flat and smooth shaded faces in sculpt
mode. Issue from looptri merge.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c2
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 9ec9f2fef6c..e6579a3d56f 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -209,7 +209,7 @@ static int partition_indices_material(PBVH *bvh, int lo, int hi)
int i = lo, j = hi;
if (bvh->looptri)
- first = &looptri[bvh->prim_indices[lo]];
+ first = &mpoly[looptri[bvh->prim_indices[lo]].poly];
else
first = &flagmats[bvh->prim_indices[lo]];
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 7c71b32e5ca..b2bfb0b47b8 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1317,7 +1317,7 @@ GPU_PBVH_Buffers *GPU_build_mesh_pbvh_buffers(
buffers = MEM_callocN(sizeof(GPU_PBVH_Buffers), "GPU_Buffers");
buffers->index_type = GL_UNSIGNED_SHORT;
- buffers->smooth = mpoly[face_indices[0]].flag & ME_SMOOTH;
+ buffers->smooth = mpoly[looptri[face_indices[0]].poly].flag & ME_SMOOTH;
buffers->show_diffuse_color = false;
buffers->use_matcaps = false;