diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-25 18:09:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-25 18:09:51 +0400 |
commit | 2c38c32661427b48e548f27f538a15ff2543b84a (patch) | |
tree | 541337dd4cacef28f51a351d9603f4e71589221e /source | |
parent | 7e580ed90642ec005fe434a96dc6200558c6343b (diff) |
make weight paint respect box & near clipping.
also replace strncmp with BLI_path_ncmp for BLI_rebase_path, (so its case insensitive on windows)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 3c43fe2fb72..06b1f1f09b1 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1619,7 +1619,7 @@ int BLI_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const rel_dir[0] = 0; /* if image is "below" current .blend file directory */ - if (!strncmp(path, blend_dir, len)) { + if (!BLI_path_ncmp(path, blend_dir, len)) { /* if image is _in_ current .blend file directory */ if (BLI_path_cmp(dir, blend_dir) == 0) { diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 3981114c349..bc1d0cd2f69 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -868,7 +868,10 @@ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float co[3], { float vertco[2]; - if (ED_view3d_project_float_global(vc->ar, co, vertco, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) { + if (ED_view3d_project_float_global(vc->ar, + co, vertco, + V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK) + { float delta[2]; float dist_squared; |