From 33d609144ef60c0223b2925cd39a713ed8c9060c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 28 May 2013 14:24:03 +0000 Subject: Cycles: normal maps are now backwards compatible again after recent fix, with a separate Blender Object/World Space that is compatible with Blender render baking and uses the YZ flipping convention. --- source/blender/makesdna/DNA_node_types.h | 8 +++++--- source/blender/makesrna/intern/rna_nodetree.c | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index e3606f57e48..8a9a95a9935 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -944,9 +944,11 @@ typedef struct NodeShaderNormalMap { #define SHD_TANGENT_AXIS_Z 2 /* normal map space */ -#define SHD_NORMAL_MAP_TANGENT 0 -#define SHD_NORMAL_MAP_OBJECT 1 -#define SHD_NORMAL_MAP_WORLD 2 +#define SHD_NORMAL_MAP_TANGENT 0 +#define SHD_NORMAL_MAP_OBJECT 1 +#define SHD_NORMAL_MAP_WORLD 2 +#define SHD_NORMAL_MAP_BLENDER_OBJECT 3 +#define SHD_NORMAL_MAP_BLENDER_WORLD 4 /* blur node */ #define CMP_NODE_BLUR_ASPECT_NONE 0 diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index e57256efd87..8bc446d7bfc 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3460,6 +3460,8 @@ static void def_sh_normal_map(StructRNA *srna) {SHD_NORMAL_MAP_TANGENT, "TANGENT", 0, "Tangent Space", "Tangent space normal mapping"}, {SHD_NORMAL_MAP_OBJECT, "OBJECT", 0, "Object Space", "Object space normal mapping"}, {SHD_NORMAL_MAP_WORLD, "WORLD", 0, "World Space", "World space normal mapping"}, + {SHD_NORMAL_MAP_BLENDER_OBJECT, "BLENDER_OBJECT", 0, "Blender Object Space", "Object space normal mapping, compatible with Blender render baking"}, + {SHD_NORMAL_MAP_BLENDER_WORLD, "BLENDER_WORLD", 0, "Blender World Space", "World space normal mapping, compatible with Blender render baking"}, {0, NULL, 0, NULL, NULL} }; -- cgit v1.2.3