diff options
author | Matt Ebb <matt@mke3.net> | 2009-11-04 08:31:42 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-11-04 08:31:42 +0300 |
commit | a799b6ee06d23ab5dfcaed4cc5ccae1f93557ac5 (patch) | |
tree | 1116128c4117c40191bd88699cfbb0ba35f67119 /source/blender/blenkernel/intern/modifier.c | |
parent | 7699dcaab887f2950e558ea51081948244e16560 (diff) |
Fix for [#19745] displacement modifier is messing up texture coordinates when using an object for texture coordinates
Modifier was resetting object's imat to worldspace during render process, where it is assumed to be in camera space.
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index a445b6986f6..3c52dc0af84 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -3577,10 +3577,11 @@ static void get_texture_coords(DisplaceModifierData *dmd, Object *ob, { int i; int texmapping = dmd->texmapping; + float mapob_imat[4][4]; if(texmapping == MOD_DISP_MAP_OBJECT) { if(dmd->map_object) - Mat4Invert(dmd->map_object->imat, dmd->map_object->obmat); + Mat4Invert(mapob_imat, dmd->map_object->obmat); else /* if there is no map object, default to local */ texmapping = MOD_DISP_MAP_LOCAL; } @@ -3651,7 +3652,7 @@ static void get_texture_coords(DisplaceModifierData *dmd, Object *ob, case MOD_DISP_MAP_OBJECT: VECCOPY(*texco, *co); Mat4MulVecfl(ob->obmat, *texco); - Mat4MulVecfl(dmd->map_object->imat, *texco); + Mat4MulVecfl(mapob_imat, *texco); break; } } |