Fix #31673, File Output node forgets about socket names. Was checking for wrong file version for do_versions.

This commit is contained in:
Lukas Toenne
2012-06-01 15:16:58 +00:00
parent 04466171c1
commit abc1a27762

View File

@@ -6728,7 +6728,7 @@ static void do_versions_mesh_mloopcol_swap_2_62_1(Mesh *me)
} }
} }
static void do_versions_nodetree_multi_file_output_path_2_64_0(bNodeTree *ntree) static void do_versions_nodetree_multi_file_output_path_2_63_1(bNodeTree *ntree)
{ {
bNode *node; bNode *node;
@@ -6739,7 +6739,6 @@ static void do_versions_nodetree_multi_file_output_path_2_64_0(bNodeTree *ntree)
NodeImageMultiFileSocket *input = sock->storage; NodeImageMultiFileSocket *input = sock->storage;
/* input file path is stored in dedicated struct now instead socket name */ /* input file path is stored in dedicated struct now instead socket name */
BLI_strncpy(input->path, sock->name, sizeof(input->path)); BLI_strncpy(input->path, sock->name, sizeof(input->path));
sock->name[0] = '\0'; /* unused */
} }
} }
} }
@@ -7340,20 +7339,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
for (part = main->particle.first; part; part = part->id.next) for (part = main->particle.first; part; part = part->id.next)
part->flag |= PART_ROTATIONS; part->flag |= PART_ROTATIONS;
} }
{ }
/* file output node paths are now stored in the file info struct instead socket name */
Scene *sce;
bNodeTree *ntree;
for (sce = main->scene.first; sce; sce=sce->id.next)
if (sce->nodetree)
do_versions_nodetree_multi_file_output_path_2_64_0(sce->nodetree);
for (ntree = main->nodetree.first; ntree; ntree=ntree->id.next)
do_versions_nodetree_multi_file_output_path_2_64_0(ntree);
}
if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 1)) {
/* file output node paths are now stored in the file info struct instead socket name */
Scene *sce;
bNodeTree *ntree;
for (sce = main->scene.first; sce; sce=sce->id.next)
if (sce->nodetree)
do_versions_nodetree_multi_file_output_path_2_63_1(sce->nodetree);
for (ntree = main->nodetree.first; ntree; ntree=ntree->id.next)
do_versions_nodetree_multi_file_output_path_2_63_1(ntree);
} }
if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 3)) { if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 3)) {