diff options
author | Jeroen Bakker <jeroen@blender.org> | 2019-12-30 15:04:09 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2019-12-30 15:34:15 +0300 |
commit | f7fb1de41b68d90d971ea9ef1479a9a9a695fa04 (patch) | |
tree | 413074e33a8bec94ff8c78763b44209811c268eb /source/blender/draw/intern/draw_cache_extract_mesh.c | |
parent | 79476a9c0ab9e3f29d32a87aa8f9d859f2961cb9 (diff) |
Fix T72788: Crash Edit Custom Bone Object
In a recent refactor we splitted the lines extractor in `extract_lines` and
`extract_lines_loose`. When an object is in edit mode the extracted
lines loose also had to include a dummy bmesh edge iterator. This change
adds this missing dummy method.
Reviewed By: antoniov
Differential Revision: https://developer.blender.org/D6499
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract_mesh.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_extract_mesh.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c b/source/blender/draw/intern/draw_cache_extract_mesh.c index 4bd0aac1ecc..711be9ee776 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh.c +++ b/source/blender/draw/intern/draw_cache_extract_mesh.c @@ -678,6 +678,18 @@ static void extract_lines_loose_ledge_mesh(const MeshRenderData *UNUSED(mr), * `ibo.lines`. */ } +static void extract_lines_loose_ledge_bmesh(const MeshRenderData *UNUSED(mr), + int UNUSED(e), + BMEdge *UNUSED(eed), + void *UNUSED(elb)) +{ + /* This function is intentionally empty. The existence of this functions ensures that + * `iter_type` `MR_ITER_LVERT` is set when initializing the `MeshRenderData` (See + * `mesh_extract_iter_type`). This flag ensures that `mr->edge_loose_len` field is filled. This + * field we use in the `extract_lines_loose_finish` function to create a subrange from the + * `ibo.lines`. */ +} + static void extract_lines_loose_finish(const MeshRenderData *mr, void *UNUSED(ibo), void *UNUSED(elb)) @@ -696,7 +708,7 @@ static const MeshExtract extract_lines_loose = { NULL, NULL, NULL, - NULL, + extract_lines_loose_ledge_bmesh, extract_lines_loose_ledge_mesh, NULL, NULL, |