diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-11-21 18:06:29 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-11-21 18:07:51 +0300 |
commit | 96e39af9481cdaf644a80936af5dda2539d60cf9 (patch) | |
tree | 8c627c0dc1f67641903610298adb836f79675868 /source/blender/blenkernel/intern/curve.c | |
parent | cec83e92e6160adf1e39e0173c77743cb1ff1be7 (diff) |
transform_snap_object: Fix snap to curves.
Use `BKE_curve_texspace_get` instead `BKE_curve_boundbox_get`.
The snap to curve, even out of edit mode, is not done on the displist. So test a boundbox that covers the points seens in edit mode.
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 2f960a3a349..872b5074e4e 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -357,7 +357,7 @@ void BKE_curve_texspace_calc(Curve *cu) } } -void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_size[3]) +BoundBox *BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_size[3]) { if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) { BKE_curve_texspace_calc(cu); @@ -366,6 +366,8 @@ void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_s if (r_loc) copy_v3_v3(r_loc, cu->loc); if (r_rot) copy_v3_v3(r_rot, cu->rot); if (r_size) copy_v3_v3(r_size, cu->size); + + return cu->bb; } bool BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3]) |