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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-07-10 12:06:14 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-07-10 13:18:41 +0300
commitf9232c080d1f0ac5da6b9ab6a5f28aac0d91469f (patch)
tree4982dd65e2681d9a95fed0ae6a242b731d9b9dbf /source/blender/draw/intern/draw_manager.c
parent6f1190cbf0ea9e1134e9594f135c0c6e99bdcfc3 (diff)
DrawManager: Crash Face Selection
Init the scene of the draw context when selecting. When using face dot selection on when the subsurf modifier is active on the cage, the scene needs to be valid. It is read from the context in the `DRW_mesh_batch_cache_create_requested` and used in the `isDisabled` method of the SubSurfModifier. Reviewers: fclem, sergey Differential Revision: https://developer.blender.org/D5214
Diffstat (limited to 'source/blender/draw/intern/draw_manager.c')
-rw-r--r--source/blender/draw/intern/draw_manager.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 2a241264988..dca6af74a9d 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -2730,6 +2730,14 @@ void DRW_draw_select_id_object(Scene *scene,
select_mode = ts->selectmode;
}
+ /* Init the scene of the draw context. When using face dot selection on
+ * when the subsurf modifier is active on the cage, the scene needs to be
+ * valid. It is read from the context in the
+ * `DRW_mesh_batch_cache_create_requested` and used in the `isDisabled`
+ * method of the SubSurfModifier. */
+ DRWContextState *draw_ctx = &DST.draw_ctx;
+ draw_ctx->scene = scene;
+
GPU_matrix_mul(ob->obmat);
const float(*world_clip_planes)[4] = NULL;