diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-06-23 17:00:43 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-06-23 17:35:11 +0300 |
commit | 1c83354c63a334a57118579d653e642524f23fce (patch) | |
tree | 1f36a10a361c00f6f20c2d2bc8da1909a55c9244 /source/blender/nodes | |
parent | c2a2f3553aed58ae9e4c165f8bfcad2b31dcf74b (diff) |
Fix T99028: crash deleting file output node with color management override
One case of copying image formats was not properly using BKE_image_format_copy.
To fix this for existing .blend file we need to do versioning, ensuring the curve
mapping is properly copied.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_output_file.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_output_file.cc b/source/blender/nodes/composite/nodes/node_composite_output_file.cc index 1fd6e62b4c5..f1621f83ac3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_output_file.cc +++ b/source/blender/nodes/composite/nodes/node_composite_output_file.cc @@ -130,7 +130,8 @@ bNodeSocket *ntreeCompositOutputFileAddSocket(bNodeTree *ntree, ntreeCompositOutputFileUniqueLayer(&node->inputs, sock, name, '_'); if (im_format) { - sockdata->format = *im_format; + BKE_image_format_copy(&sockdata->format, im_format); + sockdata->format.color_management = R_IMF_COLOR_MANAGEMENT_FOLLOW_SCENE; if (BKE_imtype_is_movie(sockdata->format.imtype)) { sockdata->format.imtype = R_IMF_IMTYPE_OPENEXR; } @@ -198,7 +199,8 @@ static void init_output_file(const bContext *C, PointerRNA *ptr) RenderData *rd = &scene->r; BLI_strncpy(nimf->base_path, rd->pic, sizeof(nimf->base_path)); - nimf->format = rd->im_format; + BKE_image_format_copy(&nimf->format, &rd->im_format); + nimf->format.color_management = R_IMF_COLOR_MANAGEMENT_FOLLOW_SCENE; if (BKE_imtype_is_movie(nimf->format.imtype)) { nimf->format.imtype = R_IMF_IMTYPE_OPENEXR; } |