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:
Diffstat (limited to 'source/blender/editors/gizmo_library')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_library_presets.c4
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_library_presets.c b/source/blender/editors/gizmo_library/gizmo_library_presets.c
index ce62171ccb0..ae43894b7b6 100644
--- a/source/blender/editors/gizmo_library/gizmo_library_presets.c
+++ b/source/blender/editors/gizmo_library/gizmo_library_presets.c
@@ -125,6 +125,8 @@ void ED_gizmo_draw_preset_circle(const struct wmGizmo *gz,
void ED_gizmo_draw_preset_facemap(
const bContext *C, const struct wmGizmo *gz, Object *ob, const int facemap, int select_id)
{
+ /* Dependency graph is supposed to be evaluated prior to draw. */
+ Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C);
const bool is_select = (select_id != -1);
const bool is_highlight = is_select && (gz->state & WM_GIZMO_STATE_HIGHLIGHT) != 0;
@@ -137,7 +139,7 @@ void ED_gizmo_draw_preset_facemap(
GPU_matrix_push();
GPU_matrix_mul(ob->obmat);
- ED_draw_object_facemap(CTX_data_depsgraph(C), ob, color, facemap);
+ ED_draw_object_facemap(depsgraph, ob, color, facemap);
GPU_matrix_pop();
if (is_select) {
diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
index f9ad836b054..21f779b72b1 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
@@ -363,7 +363,7 @@ static int gizmo_move_invoke(bContext *C, wmGizmo *gz, const wmEvent *event)
inter->snap_context_v3d = ED_transform_snap_object_context_create_view3d(
CTX_data_main(C),
CTX_data_scene(C),
- CTX_data_depsgraph(C),
+ CTX_data_ensure_evaluated_depsgraph(C),
0,
CTX_wm_region(C),
CTX_wm_view3d(C));