[Bf-blender-cvs] [f7fb1de41b6] master: Fix T72788: Crash Edit Custom Bone Object
Jeroen Bakker
noreply at git.blender.org
Mon Dec 30 13:34:34 CET 2019
Commit: f7fb1de41b68d90d971ea9ef1479a9a9a695fa04
Author: Jeroen Bakker
Date: Mon Dec 30 13:04:09 2019 +0100
Branches: master
https://developer.blender.org/rBf7fb1de41b68d90d971ea9ef1479a9a9a695fa04
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
===================================================================
M source/blender/draw/intern/draw_cache_extract_mesh.c
===================================================================
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,
More information about the Bf-blender-cvs
mailing list