From 62dbebc18e89ee5da846090443a8c404d8c7d777 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Sep 2024 17:31:02 +1000 Subject: [PATCH] Cleanup: pass const depsgraph for viewport funcitons --- source/blender/editors/include/ED_view3d.hh | 6 +++--- source/blender/editors/space_view3d/view3d_draw.cc | 6 +++--- source/blender/editors/space_view3d/view3d_intern.hh | 4 ++-- source/blender/editors/space_view3d/view3d_utils.cc | 2 +- source/blender/editors/space_view3d/view3d_view.cc | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/blender/editors/include/ED_view3d.hh b/source/blender/editors/include/ED_view3d.hh index 38225ce777e..e17e1431323 100644 --- a/source/blender/editors/include/ED_view3d.hh +++ b/source/blender/editors/include/ED_view3d.hh @@ -745,7 +745,7 @@ bool ED_view3d_clip_range_get(const Depsgraph *depsgraph, bool use_ortho_factor, float *r_clip_start, float *r_clip_end); -bool ED_view3d_viewplane_get(Depsgraph *depsgraph, +bool ED_view3d_viewplane_get(const Depsgraph *depsgraph, const View3D *v3d, const RegionView3D *rv3d, int winx, @@ -761,7 +761,7 @@ bool ED_view3d_viewplane_get(Depsgraph *depsgraph, void ED_view3d_polygon_offset(const RegionView3D *rv3d, float dist); void ED_view3d_calc_camera_border(const Scene *scene, - Depsgraph *depsgraph, + const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, @@ -1062,7 +1062,7 @@ void ED_view3d_quadview_update(ScrArea *area, ARegion *region, bool do_clip); /** * \note keep this synced with #ED_view3d_mats_rv3d_backup/#ED_view3d_mats_rv3d_restore */ -void ED_view3d_update_viewmat(Depsgraph *depsgraph, +void ED_view3d_update_viewmat(const Depsgraph *depsgraph, const Scene *scene, View3D *v3d, ARegion *region, diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index f4185698091..09b6ccdc03f 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -91,7 +91,7 @@ using blender::float4; /** \name General Functions * \{ */ -void ED_view3d_update_viewmat(Depsgraph *depsgraph, +void ED_view3d_update_viewmat(const Depsgraph *depsgraph, const Scene *scene, View3D *v3d, ARegion *region, @@ -375,7 +375,7 @@ void ED_view3d_draw_setup_view(const wmWindowManager *wm, * \{ */ static void view3d_camera_border(const Scene *scene, - Depsgraph *depsgraph, + const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, @@ -436,7 +436,7 @@ void ED_view3d_calc_camera_border_size(const Scene *scene, } void ED_view3d_calc_camera_border(const Scene *scene, - Depsgraph *depsgraph, + const Depsgraph *depsgraph, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, diff --git a/source/blender/editors/space_view3d/view3d_intern.hh b/source/blender/editors/space_view3d/view3d_intern.hh index 3ccb13f3be1..b0cf2632656 100644 --- a/source/blender/editors/space_view3d/view3d_intern.hh +++ b/source/blender/editors/space_view3d/view3d_intern.hh @@ -107,7 +107,7 @@ void VIEW3D_OT_localview_remove_from(wmOperatorType *ot); /** * \param rect: optional for picking (can be NULL). */ -void view3d_winmatrix_set(Depsgraph *depsgraph, +void view3d_winmatrix_set(const Depsgraph *depsgraph, ARegion *region, const View3D *v3d, const rcti *rect); @@ -123,7 +123,7 @@ void view3d_winmatrix_set(Depsgraph *depsgraph, * * \note don't set windows active in here, is used by renderwin too. */ -void view3d_viewmatrix_set(Depsgraph *depsgraph, +void view3d_viewmatrix_set(const Depsgraph *depsgraph, const Scene *scene, const View3D *v3d, RegionView3D *rv3d, diff --git a/source/blender/editors/space_view3d/view3d_utils.cc b/source/blender/editors/space_view3d/view3d_utils.cc index f704e381bc4..bb04ff537fc 100644 --- a/source/blender/editors/space_view3d/view3d_utils.cc +++ b/source/blender/editors/space_view3d/view3d_utils.cc @@ -163,7 +163,7 @@ bool ED_view3d_clip_range_get(const Depsgraph *depsgraph, return params.is_ortho; } -bool ED_view3d_viewplane_get(Depsgraph *depsgraph, +bool ED_view3d_viewplane_get(const Depsgraph *depsgraph, const View3D *v3d, const RegionView3D *rv3d, int winx, diff --git a/source/blender/editors/space_view3d/view3d_view.cc b/source/blender/editors/space_view3d/view3d_view.cc index 6aabe4c8397..ed6faf70730 100644 --- a/source/blender/editors/space_view3d/view3d_view.cc +++ b/source/blender/editors/space_view3d/view3d_view.cc @@ -299,7 +299,7 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot) /** \name Window and View Matrix Calculation * \{ */ -void view3d_winmatrix_set(Depsgraph *depsgraph, +void view3d_winmatrix_set(const Depsgraph *depsgraph, ARegion *region, const View3D *v3d, const rcti *rect) @@ -376,7 +376,7 @@ static void obmat_to_viewmat(RegionView3D *rv3d, Object *ob) mat4_normalized_to_quat(rv3d->viewquat, rv3d->viewmat); } -void view3d_viewmatrix_set(Depsgraph *depsgraph, +void view3d_viewmatrix_set(const Depsgraph *depsgraph, const Scene *scene, const View3D *v3d, RegionView3D *rv3d,