diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-26 00:28:49 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-26 00:28:49 +0400 |
commit | c3d3d8be3675e284cbe269b4173c3cc15ce762ae (patch) | |
tree | deff4134588923edb71ba8f7823562773957f6b7 /intern/cycles/blender/blender_shader.cpp | |
parent | e9859bb0e59cd54a5d682a0fc484e2366d5e54fe (diff) |
Fix cycles issue with mapping node rotation and scale order. When using both
scale and rotation in mapping node, there would be shearing, and the only way
to avoid that was to add 2 mapping nodes. This is because to transform the
texture, the inverse transform needs to be done on the texture coordinate
Now the mapping node has Texture/Point/Vector/Normal types to transform the
vector for a particular purpose. Point is the existing behavior, Texture is
the new default that behaves more like you might expect.
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 2007171642f..d915d51dfd8 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -147,6 +147,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping b_mapping) mapping->translation = get_float3(b_mapping.translation()); mapping->rotation = get_float3(b_mapping.rotation()); mapping->scale = get_float3(b_mapping.scale()); + mapping->type = (TextureMapping::Type)b_mapping.type(); mapping->x_mapping = (TextureMapping::Mapping)b_mapping.mapping_x(); mapping->y_mapping = (TextureMapping::Mapping)b_mapping.mapping_y(); @@ -161,6 +162,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::ShaderNodeMapping b_map mapping->translation = get_float3(b_mapping.translation()); mapping->rotation = get_float3(b_mapping.rotation()); mapping->scale = get_float3(b_mapping.scale()); + mapping->type = (TextureMapping::Type)b_mapping.type(); mapping->use_minmax = b_mapping.use_min() || b_mapping.use_max(); |