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:
authorSergey Sharybin <sergey.vfx@gmail.com>2010-06-07 21:38:52 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2010-06-07 21:38:52 +0400
commite012fc8107e11d3bdbdc395ad399d4145cc27639 (patch)
tree005b535df26a8b95e40483094f5e6f8ad6bf9f65 /source/blender/blenkernel/intern
parentf8346b1bcd28822c16fff0f25cfd00ae32ffe486 (diff)
Fix #22487: Shrinkwrap ignores preceding deform modifiers
ShrinkwrapCalcData->vert contains verts from derivedMesh this coordinated are deformed by vertexCos only for normal projection (to get correct normals) for other cases this field contains undeformed dm's coordinates and vertexCos should be used
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 574ec848291..bddfeb049a8 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -355,11 +355,16 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, struct S
if(calc->vert)
{
- VECCOPY(tmp_co, calc->vert[i].co);
- if(calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)
+ /* calc->vert contains verts from derivedMesh */
+ /* this coordinated are deformed by vertexCos only for normal projection (to get correct normals) */
+ /* for other cases calc->varts contains undeformed coordinates and vertexCos should be used */
+ if(calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL) {
+ VECCOPY(tmp_co, calc->vert[i].co);
normal_short_to_float_v3(tmp_no, calc->vert[i].no);
- else
+ } else {
+ VECCOPY(tmp_co, co);
VECCOPY(tmp_no, proj_axis);
+ }
}
else
{