diff options
author | Thomas Dinges <blender@dingto.org> | 2013-10-08 21:07:18 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-10-08 21:07:18 +0400 |
commit | e6ce07a5d47bcaabceb10e164b7acaf2c55072fe (patch) | |
tree | 473625588e394241d014df29b1809f3cfea6e28c /source | |
parent | 03f7885b0a87de71f677c3f733bbf870140e5d36 (diff) |
Cycles / SSS:
* Remove the compatible falloff SSS implementation. We shouldn't support two implementations in the long term, and 2.7x is a good release number do break some compatibility as well.
* Version patch added, so Files with Compatible falloff will automatically use Cubic now.
It was already mentioned in the manual, that Compatible is deprecated.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 16 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 1 |
4 files changed, 18 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 19c1360b6cc..5b32e7229d5 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -42,7 +42,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 269 -#define BLENDER_SUBVERSION 0 +#define BLENDER_SUBVERSION 1 /* 262 was the last editmesh release but it has compatibility code for bmesh data */ #define BLENDER_MINVERSION 262 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b673246a38f..8dc9622393c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9707,6 +9707,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + + if (!MAIN_VERSION_ATLEAST(main, 269, 1)) { + /* Removal of Cycles SSS Compatible fallof */ + FOREACH_NODETREE(main, ntree, id) { + if (ntree->type == NTREE_SHADER) { + bNode *node; + for (node = ntree->nodes.first; node; node = node->next) { + if (node->type == SH_NODE_SUBSURFACE_SCATTERING) { + if (node->custom1 == SHD_SUBSURFACE_COMPATIBLE) { + node->custom1 = SHD_SUBSURFACE_CUBIC; + } + } + } + } + } FOREACH_NODETREE_END + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init see do_versions_userdef() above! */ diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 5cfe3fd2082..0ed620c4632 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -976,7 +976,7 @@ typedef struct NodeShaderNormalMap { #define SHD_NORMAL_MAP_BLENDER_WORLD 4 /* subsurface */ -#define SHD_SUBSURFACE_COMPATIBLE 0 +#define SHD_SUBSURFACE_COMPATIBLE 0 // Deprecated #define SHD_SUBSURFACE_CUBIC 1 #define SHD_SUBSURFACE_GAUSSIAN 2 diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index d2f181d41b2..8ad19735517 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3699,7 +3699,6 @@ static void def_sh_tangent(StructRNA *srna) static void def_sh_subsurface(StructRNA *srna) { static EnumPropertyItem prop_subsurface_falloff_items[] = { - {SHD_SUBSURFACE_COMPATIBLE, "COMPATIBLE", 0, "Compatible", "Subsurface scattering falloff compatible with previous versions"}, {SHD_SUBSURFACE_CUBIC, "CUBIC", 0, "Cubic", "Simple cubic falloff function"}, {SHD_SUBSURFACE_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", "Normal distribution, multiple can be combined to fit more complex profiles"}, {0, NULL, 0, NULL, NULL} |