Fix crash opening really old files with compositor

There was lack of certain sockets do-versaions: namely the ones
which were added in blender versions after the one used to save
the file.
This commit is contained in:
Sergey Sharybin 2017-05-19 15:41:26 +02:00
parent a7c4b6f49c
commit 0e46da76b7
Notes: blender-bot 2023-02-14 02:41:05 +01:00
Referenced by commit f4074ce8d7, Revert "Fix crash opening really old files with compositor"
1 changed files with 2 additions and 0 deletions

View File

@ -1615,6 +1615,8 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
bNode *node;
for (node = ntree->nodes.first; node; node = node->next) {
if (node->type == CMP_NODE_R_LAYERS) {
/* Make sure new sockets are properly created. */
node_verify_socket_templates(ntree, node);
int pass_index = 0;
const char *sockname;
for (bNodeSocket *sock = node->outputs.first; sock && pass_index < 31; sock = sock->next, pass_index++) {