From 22ea604c6f877f36747b9e07b0459ee20cf6b0e5 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 24 Mar 2011 18:39:54 +0000 Subject: [PATCH] Bugfix 26578 "Warp" texture map option didnt work for new bump methods yet. Also fixed to not grey out bump menu for this mapping option. --- release/scripts/startup/bl_ui/properties_texture.py | 2 +- .../blender/render/intern/source/render_texture.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 7e289f1ecce..f6fa86d64aa 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -1015,7 +1015,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): # only show bump settings if activated but not for normalmap images row = layout.row() - row.active = tex.use_map_normal and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) + row.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) row.prop(tex, "bump_method", text="Method") diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index acc69680487..2b98e7a3f96 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -2339,9 +2339,16 @@ void do_material_tex(ShadeInput *shi) } // warping, local space if(mtex->mapto & MAP_WARP) { - warpvec[0]= mtex->warpfac*texres.nor[0]; - warpvec[1]= mtex->warpfac*texres.nor[1]; - warpvec[2]= mtex->warpfac*texres.nor[2]; + float *warpnor= texres.nor, warpnor_[3]; + + if(use_ntap_bump) { + VECCOPY(warpnor_, texres.nor); + warpnor= warpnor_; + normalize_v3(warpnor_); + } + warpvec[0]= mtex->warpfac*warpnor[0]; + warpvec[1]= mtex->warpfac*warpnor[1]; + warpvec[2]= mtex->warpfac*warpnor[2]; warpdone= 1; } #if 0