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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-26 00:28:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-26 00:28:49 +0400
commitc3d3d8be3675e284cbe269b4173c3cc15ce762ae (patch)
treedeff4134588923edb71ba8f7823562773957f6b7 /source/blender/makesdna
parente9859bb0e59cd54a5d682a0fc484e2366d5e54fe (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 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_node_types.h2
-rw-r--r--source/blender/makesdna/DNA_texture_types.h8
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index a82d1a71a1e..5cfe3fd2082 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -975,7 +975,7 @@ typedef struct NodeShaderNormalMap {
#define SHD_NORMAL_MAP_BLENDER_OBJECT 3
#define SHD_NORMAL_MAP_BLENDER_WORLD 4
-/* tangent */
+/* subsurface */
#define SHD_SUBSURFACE_COMPATIBLE 0
#define SHD_SUBSURFACE_CUBIC 1
#define SHD_SUBSURFACE_GAUSSIAN 2
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 0b6e5f9c7bb..fcd0575f1c5 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -263,7 +263,7 @@ typedef struct TexMapping {
float loc[3], rot[3], size[3];
int flag;
char projx, projy, projz, mapping;
- int pad;
+ int type;
float mat[4][4];
float min[3], max[3];
@@ -287,6 +287,12 @@ typedef struct ColorMapping {
#define TEXMAP_CLIP_MAX 2
#define TEXMAP_UNIT_MATRIX 4
+/* texmap->type */
+#define TEXMAP_TYPE_POINT 0
+#define TEXMAP_TYPE_TEXTURE 1
+#define TEXMAP_TYPE_VECTOR 2
+#define TEXMAP_TYPE_NORMAL 3
+
/* colormap->flag */
#define COLORMAP_USE_RAMP 1