diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-17 20:09:41 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-17 21:45:08 +0300 |
commit | aca9a1bac3ad6290345d62b6cfe2fb5223854d22 (patch) | |
tree | 7970230586bda52d7a7819750d72694b62962b31 /source/blender/editors/include | |
parent | ebcf49fe1a5980b1ac94f13443b0630b99534a25 (diff) |
Transform Snap Refactor: Use enum for cage snap options
This allows the addition of the `SNAP_GEOM_CAGE` option.
Currently unused.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_transform_snap_object_context.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_transform_snap_object_context.h b/source/blender/editors/include/ED_transform_snap_object_context.h index b7174964ef6..a63c1e86a50 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.h +++ b/source/blender/editors/include/ED_transform_snap_object_context.h @@ -39,12 +39,18 @@ struct View3D; /* ED_transform_snap_object_*** API */ -typedef enum eSnapSelect { +typedef enum { SNAP_ALL = 0, SNAP_NOT_SELECTED = 1, SNAP_NOT_ACTIVE = 2, } eSnapSelect; +typedef enum { + SNAP_GEOM_FINAL = 0, + SNAP_GEOM_CAGE = 1, + SNAP_GEOM_EDIT = 2, /* Bmesh for mesh-type. */ +} eSnapEditType; + /** used for storing multiple hits */ struct SnapObjectHitDepth { struct SnapObjectHitDepth *next, *prev; @@ -64,10 +70,10 @@ struct SnapObjectHitDepth { /** parameters that define which objects will be used to snap. */ struct SnapObjectParams { - /* special context sensitive handling for the active or selected object */ + /* Special context sensitive handling for the active or selected object. */ char snap_select; - /* use editmode cage */ - unsigned int use_object_edit_cage : 1; + /* Geometry for snapping in edit mode. */ + char edit_mode_type; /* snap to the closest element, use when using more than one snap type */ unsigned int use_occlusion_test : 1; /* exclude back facing geometry from snapping */ |