diff options
Diffstat (limited to 'source/blender')
6 files changed, 10 insertions, 29 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 483caf7c475..84d1edd23ec 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -167,12 +167,6 @@ void ED_widgetgroup_manipulator2d_draw_prepare(const struct bContext *C, struct /* Snapping */ -typedef enum SnapSelect { - SNAP_ALL = 0, - SNAP_NOT_SELECTED = 1, - SNAP_NOT_ACTIVE = 2, -} SnapSelect; - #define SNAP_MIN_DISTANCE 30 bool peelObjectsTransform( @@ -195,11 +189,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); 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 3a042ebfb1d..b802694444b 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.h +++ b/source/blender/editors/include/ED_transform_snap_object_context.h @@ -42,6 +42,12 @@ struct bContext; /* 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; diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c index f62a12b071f..9aaa766be74 100644 --- a/source/blender/editors/space_view3d/view3d_ruler.c +++ b/source/blender/editors/space_view3d/view3d_ruler.c @@ -51,7 +51,6 @@ #include "ED_screen.h" #include "ED_view3d.h" -#include "ED_transform.h" #include "ED_transform_snap_object_context.h" #include "ED_space_api.h" diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index d4642edf084..44b7fadd29f 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -49,7 +49,6 @@ #include "ED_screen.h" #include "ED_space_api.h" -#include "ED_transform.h" #include "ED_transform_snap_object_context.h" #include "PIL_time.h" /* smoothview */ diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 1181f584313..ddb46bce3ea 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1001,7 +1001,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; @@ -1397,22 +1397,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, - r_loc, r_dist_px, r_node_border); -} - -bool snapNodesContext( - bContext *C, const int mval[2], SnapSelect snap_select, - float r_loc[2], float *r_dist_px, char *r_node_border) -{ - Scene *scene = CTX_data_scene(C); - ARegion *ar = CTX_wm_region(C); - return snapNodes( - scene->toolsettings, CTX_wm_space_node(C), ar, mval, snap_select, + t->settings, t->sa->spacedata.first, t->ar, mval, t->tsnap.modeSelect, r_loc, r_dist_px, r_node_border); } diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 30aaad83f03..52673fdf4da 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -748,8 +748,6 @@ static bool raycastObj( ray_start, ray_dir, ob, dm, obmat, ob_index, ray_depth, r_loc, r_no, r_index, r_hit_list); - - dm->release(dm); } } |