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:
-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;