diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-04-22 14:54:35 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-04-22 14:59:14 +0300 |
commit | bc83fc9c04bef0e151518e8da299243999363799 (patch) | |
tree | 9528b342b647cf14f19f538b5c207bbabf17fb59 /source/blender/draw/intern/DRW_render.h | |
parent | b2cc2dda9c37775b04b6a9b4e07a25a51c74c693 (diff) |
Fix T75981: crash in sculpt mode with mesh that used to have multiple materials
The material indices in a mesh can exceed the number of available materials
slots in the object or mesh, sculpt drawing was not taking that into account.
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index de4bf0303fe..663567fd51e 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -411,7 +411,10 @@ void DRW_shgroup_call_instances_with_attrs(DRWShadingGroup *shgroup, struct GPUBatch *inst_attributes); void DRW_shgroup_call_sculpt(DRWShadingGroup *sh, Object *ob, bool wire, bool mask, bool vcol); -void DRW_shgroup_call_sculpt_with_materials(DRWShadingGroup **sh, Object *ob, bool vcol); +void DRW_shgroup_call_sculpt_with_materials(DRWShadingGroup **sh, + int num_sh, + Object *ob, + bool vcol); DRWCallBuffer *DRW_shgroup_call_buffer(DRWShadingGroup *shading_group, struct GPUVertFormat *format, |