Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-08 05:09:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-08 05:09:59 +0300
commit0242a96f3bc0d844c6ca1c3916671b891de10d9f (patch)
treee09e8d09479c4dbf1193f577c806c4b1c0c52018 /source/blender/blenkernel/intern/shrinkwrap.c
parent89bb5e6423b613173d5b71d5bab2789a34e3e059 (diff)
Change in behavior to shrinkwrap modifier's offset value with negative enabled.
- negative ray casts would invert the offset direction. this meant if positive and negative were enabled at once and the mesh was slightly inside & outside the object it wrapped, the offset would be applied in opposite directions. This way the offset is always along the vertex normal. - allow negative offset from RNA, could be useful and no benefit to disable.
Diffstat (limited to 'source/blender/blenkernel/intern/shrinkwrap.c')
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 75a955a09a9..48d9a4e0dee 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -378,9 +378,6 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
normal_projection_project_vertex(0, tmp_co, tmp_no, &local2aux, auxData.tree, &hit, auxData.raycast_callback, &auxData);
normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, tmp_no, &calc->local2target, treeData.tree, &hit, treeData.raycast_callback, &treeData);
-
- if(hit.index != -1)
- madd_v3_v3v3fl(hit.co, hit.co, tmp_no, -calc->keepDist);
}
//Project over negative direction of axis
@@ -393,14 +390,12 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
normal_projection_project_vertex(0, tmp_co, inv_no, &local2aux, auxData.tree, &hit, auxData.raycast_callback, &auxData);
normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, inv_no, &calc->local2target, treeData.tree, &hit, treeData.raycast_callback, &treeData);
-
- if(hit.index != -1)
- madd_v3_v3v3fl(hit.co, hit.co, tmp_no, calc->keepDist);
}
if(hit.index != -1)
{
+ madd_v3_v3v3fl(hit.co, hit.co, tmp_no, calc->keepDist);
interp_v3_v3v3(co, co, hit.co, weight);
}
}