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:
authorCampbell Barton <campbell@blender.org>2022-02-18 08:43:10 +0300
committerCampbell Barton <campbell@blender.org>2022-02-18 08:48:27 +0300
commitf33e6e0d8c607eb33b1eb0c587b4e43cde30d5e1 (patch)
tree07cfc1e5610853f9370010da428023fc0d7eea4b /source/blender/editors/include/ED_view3d.h
parentae9dd0cbf911662798e7dfb3120721d949f6cd40 (diff)
Cleanup: move camera-view pan/zoom into utility functions
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r--source/blender/editors/include/ED_view3d.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 46c9a1973eb..18b63403fcb 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -1078,6 +1078,20 @@ bool ED_view3d_persp_ensure(const struct Depsgraph *depsgraph,
struct View3D *v3d,
struct ARegion *region);
+/* Camera view functions. */
+
+/**
+ * Utility to scale zoom level when in camera-view #RegionView3D.camzoom and apply limits.
+ * \return true a change was made.
+ */
+bool ED_view3d_camera_view_zoom_scale(struct RegionView3D *rv3d, const float scale);
+/**
+ * Utility to pan when in camera view.
+ * \param event_ofs: The offset the pan in screen (pixel) coordinates.
+ * \return true when a change was made.
+ */
+bool ED_view3d_camera_view_pan(struct ARegion *region, const float event_ofs[2]);
+
/* Camera lock functions */
/**