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
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-07-25 14:25:53 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-07-25 14:25:53 +0400
commit237b8e496a6b28262cfdf5b24f78c65f5a1ee19c (patch)
tree4819790900d9912466447d5beab4562cbb34637f /source/blender/nodes
parentf2d9e2410cbbcba02471c6f673dcbef52479b886 (diff)
Fix #32178, Adding "File Output" node crashes when a video output type is selected.
The image format for the node and sockets were not properly initialized. The file output node only supports image types (not movies), so it needs to check for proper format type after copying from the render settings.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_outputFile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
index fcc8ed4a128..fd312d71f2c 100644
--- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c
+++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
@@ -123,6 +123,8 @@ bNodeSocket *ntreeCompositOutputFileAddSocket(bNodeTree *ntree, bNode *node, con
sockdata->format.imtype= R_IMF_IMTYPE_OPENEXR;
}
}
+ else
+ BKE_imformat_defaults(&sockdata->format);
/* use node data format by default */
sockdata->use_node_format = TRUE;
@@ -174,9 +176,14 @@ static void init_output_file(bNodeTree *ntree, bNode* node, bNodeTemplate *ntemp
RenderData *rd = &ntemp->scene->r;
BLI_strncpy(nimf->base_path, rd->pic, sizeof(nimf->base_path));
nimf->format = rd->im_format;
+ if (BKE_imtype_is_movie(nimf->format.imtype)) {
+ nimf->format.imtype= R_IMF_IMTYPE_OPENEXR;
+ }
- format = &rd->im_format;
+ format = &nimf->format;
}
+ else
+ BKE_imformat_defaults(&nimf->format);
/* add one socket by default */
ntreeCompositOutputFileAddSocket(ntree, node, "Image", format);