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:
authorSiddhartha Jejurkar <sidd017>2021-09-29 10:47:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-29 10:48:35 +0300
commitbf06f76be6316be92a4655a41391e163d2fb1221 (patch)
tree5dac6a12fb65f0897806739d5ef8e00407112041 /source/blender/editors/include/ED_image.h
parent008ae26712f85475a8a9dc4d031447e12fb05522 (diff)
UV Editor: Grid and snapping improvements
Implements T89789, T89792, custom grid (described as dynamic grid in T78389) and UV grid snapping (T78391) Replaces the default UV editor grid with 2 new types of grid : * Custom grid: Allows the user to create an NxN grid, where the value of N is specified by the user. * Subdividing grid: Subdivides the UV editor grid when the user zooms in the viewport and vice versa when zooming out. UV snapping improvements : * Increment snapping: Increment values for snapping are calculated based on which grid type is being used in the UV editor (subdividing or custom). In general the increment value is equal to the distance between 2 visible grid lines. * Absolute grid snap: New toggle added to increment snapping option in the UV editor, allows UV grid snapping during translation. Reviewed By: campbellbarton Ref D12684
Diffstat (limited to 'source/blender/editors/include/ED_image.h')
-rw-r--r--source/blender/editors/include/ED_image.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h
index 6b0b9f4a27c..9532035a1cd 100644
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@ -41,6 +41,16 @@ struct SpaceImage;
struct bContext;
struct wmOperator;
struct wmWindowManager;
+struct View2D;
+
+/* image_draw.c */
+float ED_space_image_zoom_level(const struct View2D *v2d, const int grid_dimension);
+void ED_space_image_grid_steps(struct SpaceImage *sima,
+ float grid_steps[SI_GRID_STEPS_LEN],
+ const int grid_dimension);
+float ED_space_image_increment_snap_value(const int grid_dimesnions,
+ const float grid_steps[SI_GRID_STEPS_LEN],
+ const float zoom_factor);
/* image_edit.c, exported for transform */
struct Image *ED_space_image(struct SpaceImage *sima);