diff options
author | Germano <germano.costa@ig.com.br> | 2018-05-13 05:39:36 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-05-13 05:39:36 +0300 |
commit | 6c6a394373999562d4c29ac17f7f98fe3f2b3364 (patch) | |
tree | 8d9a324ee86ec9d8361a2c5b06c97513e7f950ee /source/blender/editors/transform/transform_snap_object.c | |
parent | 9c212399c6da277414eeba56347bedcbed458280 (diff) |
Cleanup: Remove unused member.
Diffstat (limited to 'source/blender/editors/transform/transform_snap_object.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index 48caf70fe02..00976311887 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -80,7 +80,6 @@ enum eViewProj { typedef struct SnapData { short snap_to; float mval[2]; - float ray_origin[3]; float ray_start[3]; float ray_dir[3]; float pmat[4][4]; /* perspective matrix */ @@ -212,15 +211,14 @@ static void iter_snap_objects( static void snap_data_set( SnapData *snapdata, const ARegion *ar, const unsigned short snap_to, const enum eViewProj view_proj, - const float mval[2], const float ray_origin[3], const float ray_start[3], - const float ray_direction[3], const float depth_range[2]) + const float mval[2], const float ray_start[3], const float ray_direction[3], + const float depth_range[2]) { copy_m4_m4(snapdata->pmat, ((RegionView3D *)ar->regiondata)->persmat); snapdata->win_size[0] = ar->winx; snapdata->win_size[1] = ar->winy; copy_v2_v2(snapdata->mval, mval); snapdata->snap_to = snap_to; - copy_v3_v3(snapdata->ray_origin, ray_origin); copy_v3_v3(snapdata->ray_start, ray_start); copy_v3_v3(snapdata->ray_dir, ray_direction); snapdata->view_proj = view_proj; @@ -2217,11 +2215,11 @@ bool ED_transform_snap_object_project_view3d_ex( float r_loc[3], float r_no[3], int *r_index, Object **r_ob, float r_obmat[4][4]) { - float ray_origin[3], ray_start[3], ray_normal[3], depth_range[2], ray_end[3]; - const ARegion *ar = sctx->v3d_data.ar; const RegionView3D *rv3d = ar->regiondata; + float ray_origin[3], ray_end[3], ray_start[3], ray_normal[3], depth_range[2]; + ED_view3d_win_to_origin(ar, mval, ray_origin); ED_view3d_win_to_vector(ar, mval, ray_normal); @@ -2252,9 +2250,12 @@ bool ED_transform_snap_object_project_view3d_ex( } else { SnapData snapdata; - const enum eViewProj view_proj = ((RegionView3D *)ar->regiondata)->is_persp ? VIEW_PROJ_PERSP : VIEW_PROJ_ORTHO; - snap_data_set(&snapdata, ar, snap_to, view_proj, mval, - ray_origin, ray_start, ray_normal, depth_range); + const enum eViewProj view_proj = rv3d->is_persp ? + VIEW_PROJ_PERSP : VIEW_PROJ_ORTHO; + + snap_data_set( + &snapdata, ar, snap_to, view_proj, mval, + ray_start, ray_normal, depth_range); return snapObjectsRay( sctx, &snapdata, |