Transform: Move enum SnapSelect
to ED_transform_snap_object_context
This commit is contained in:
@@ -159,12 +159,6 @@ void BIF_draw_manipulator(const struct bContext *C);
|
||||
|
||||
/* Snapping */
|
||||
|
||||
typedef enum SnapSelect {
|
||||
SNAP_ALL = 0,
|
||||
SNAP_NOT_SELECTED = 1,
|
||||
SNAP_NOT_ACTIVE = 2,
|
||||
} SnapSelect;
|
||||
|
||||
#define SNAP_MIN_DISTANCE 30
|
||||
|
||||
bool peelObjectsTransform(
|
||||
@@ -187,11 +181,7 @@ bool snapObjectsTransform(
|
||||
/* return args */
|
||||
float r_loc[3], float r_no[3]);
|
||||
bool snapNodesTransform(
|
||||
struct TransInfo *t, const int mval[2], SnapSelect snap_select,
|
||||
/* return args */
|
||||
float r_loc[2], float *r_dist_px, char *r_node_border);
|
||||
bool snapNodesContext(
|
||||
struct bContext *C, const int mval[2], SnapSelect snap_select,
|
||||
struct TransInfo *t, const int mval[2],
|
||||
/* return args */
|
||||
float r_loc[2], float *r_dist_px, char *r_node_border);
|
||||
|
||||
|
@@ -40,6 +40,12 @@ struct View3D;
|
||||
|
||||
/* ED_transform_snap_object_*** API */
|
||||
|
||||
typedef enum SnapSelect {
|
||||
SNAP_ALL = 0,
|
||||
SNAP_NOT_SELECTED = 1,
|
||||
SNAP_NOT_ACTIVE = 2,
|
||||
} SnapSelect;
|
||||
|
||||
/** used for storing multiple hits */
|
||||
struct SnapObjectHitDepth {
|
||||
struct SnapObjectHitDepth *next, *prev;
|
||||
|
@@ -1017,7 +1017,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
|
||||
float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here
|
||||
char node_border;
|
||||
|
||||
if (snapNodesTransform(t, t->mval, t->tsnap.modeSelect, loc, &dist_px, &node_border)) {
|
||||
if (snapNodesTransform(t, t->mval, loc, &dist_px, &node_border)) {
|
||||
copy_v2_v2(t->tsnap.snapPoint, loc);
|
||||
t->tsnap.snapNodeBorder = node_border;
|
||||
|
||||
@@ -1413,11 +1413,11 @@ static bool snapNodes(
|
||||
}
|
||||
|
||||
bool snapNodesTransform(
|
||||
TransInfo *t, const int mval[2], SnapSelect snap_select,
|
||||
TransInfo *t, const int mval[2],
|
||||
float r_loc[2], float *r_dist_px, char *r_node_border)
|
||||
{
|
||||
return snapNodes(
|
||||
t->settings, t->sa->spacedata.first, t->ar, mval, snap_select,
|
||||
t->settings, t->sa->spacedata.first, t->ar, mval, t->tsnap.modeSelect,
|
||||
r_loc, r_dist_px, r_node_border);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user