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:
authorJoep Peters <Joep>2019-01-22 17:38:56 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-22 19:05:18 +0300
commit1651879d3419eed71d98bc46dba4adce3c09e573 (patch)
tree51396caa7c89440758c529a9a5480f0bb89559a0 /source/blender/makesdna
parentbabba31c49ef635cad8621444a2f7b7316690512 (diff)
UV Editor: support snapping to center of pixels, in addition to corners.
Differential Revision: https://developer.blender.org/D4150
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_space_types.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 4ffd6c4842e..999e160e03a 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -1020,10 +1020,11 @@ typedef struct SpaceImage {
char dt_uvstretch;
char around;
- int pad2;
-
int flag;
+ char pixel_snap_mode;
+ char pad[3];
+
MaskSpaceInfo mask_info;
} SpaceImage;
@@ -1042,6 +1043,13 @@ typedef enum eSpaceImage_UVDT_Stretch {
SI_UVDT_STRETCH_AREA = 1,
} eSpaceImage_UVDT_Stretch;
+/* SpaceImage.pixel_snap_mode */
+typedef enum eSpaceImage_PixelSnapMode {
+ SI_PIXEL_SNAP_DISABLED = 0,
+ SI_PIXEL_SNAP_CENTER = 1,
+ SI_PIXEL_SNAP_CORNER = 2,
+} eSpaceImage_Snap_Mode;
+
/* SpaceImage.mode */
typedef enum eSpaceImage_Mode {
SI_MODE_VIEW = 0,
@@ -1071,7 +1079,7 @@ typedef enum eSpaceImage_Flag {
SI_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */
SI_FLAG_DEPRECATED_8 = (1 << 8), /* cleared */
SI_COORDFLOATS = (1 << 9),
- SI_PIXELSNAP = (1 << 10),
+ SI_FLAG_DEPRECATED_10 = (1 << 10),
SI_LIVE_UNWRAP = (1 << 11),
SI_USE_ALPHA = (1 << 12),
SI_SHOW_ALPHA = (1 << 13),