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
path: root/source
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2018-12-28 12:26:45 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2018-12-28 13:32:33 +0300
commitc07ae0e821e441b3c3a9b6f192487744c54f4015 (patch)
tree2a4665adc741aa9f9165ca34ce5276f763383bc2 /source
parent1e935b090be3287f835d6bcbacc6b2c5345f3936 (diff)
Fix T59922: crash reading files with older renderlayers
- own error in rB2c196de56bbb163048b08f321983234a5e72e804 - now introduce RE_PASSNAME_DEPRECATED placeholder for old passes - also dont allocate NodeImageLayers for these Reviewers: brecht Maniphest Tasks: T59922 Differential Revision: https://developer.blender.org/D4132
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/versioning_270.c4
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c4
3 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 7e201aaf1d1..201e3bf1c51 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -316,6 +316,10 @@ static void do_versions_compositor_render_passes_storage(bNode *node)
int pass_index = 0;
const char *sockname;
for (bNodeSocket *sock = node->outputs.first; sock && pass_index < 31; sock = sock->next, pass_index++) {
+ if ((pass_index >= 6 && pass_index <= 8) || (pass_index >= 11 && pass_index <= 13)) {
+ /* deprecated passes */
+ continue;
+ }
if (sock->storage == NULL) {
NodeImageLayer *sockdata = MEM_callocN(sizeof(NodeImageLayer), "node image layer");
sock->storage = sockdata;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index ad33c57b3c8..2d0838a04c5 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -266,6 +266,8 @@ typedef enum eScenePassType {
SCE_PASS_ROUGHNESS = (1u << 31u),
} eScenePassType;
+#define RE_PASSNAME_DEPRECATED "Deprecated"
+
#define RE_PASSNAME_COMBINED "Combined"
#define RE_PASSNAME_Z "Depth"
#define RE_PASSNAME_VECTOR "Vector"
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index 8d400ada0c7..6cb7704d1a7 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -354,7 +354,9 @@ const char *node_cmp_rlayers_sock_to_pass(int sock_index)
{
const char *sock_to_passname[] = {
RE_PASSNAME_COMBINED, RE_PASSNAME_COMBINED,
- RE_PASSNAME_Z, RE_PASSNAME_NORMAL, RE_PASSNAME_UV, RE_PASSNAME_VECTOR, RE_PASSNAME_SHADOW, RE_PASSNAME_AO,
+ RE_PASSNAME_Z, RE_PASSNAME_NORMAL, RE_PASSNAME_UV, RE_PASSNAME_VECTOR, RE_PASSNAME_DEPRECATED,
+ RE_PASSNAME_DEPRECATED, RE_PASSNAME_DEPRECATED, RE_PASSNAME_SHADOW, RE_PASSNAME_AO,
+ RE_PASSNAME_DEPRECATED, RE_PASSNAME_DEPRECATED, RE_PASSNAME_DEPRECATED,
RE_PASSNAME_INDEXOB, RE_PASSNAME_INDEXMA, RE_PASSNAME_MIST, RE_PASSNAME_EMIT, RE_PASSNAME_ENVIRONMENT,
RE_PASSNAME_DIFFUSE_DIRECT, RE_PASSNAME_DIFFUSE_INDIRECT, RE_PASSNAME_DIFFUSE_COLOR,
RE_PASSNAME_GLOSSY_DIRECT, RE_PASSNAME_GLOSSY_INDIRECT, RE_PASSNAME_GLOSSY_COLOR,