Fix #119911: Compositor saved in 4.2 does not work in 4.1 #120246

Merged
Omar Emara merged 2 commits from OmarEmaraDev/blender:fix-119911 into main 2024-04-04 13:14:23 +02:00
2 changed files with 10 additions and 7 deletions

View File

@ -1136,13 +1136,12 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
if (sce->nodetree) {
BLO_write_init_id_buffer_from_id(
temp_embedded_id_buffer, &sce->nodetree->id, BLO_write_is_undo(writer));
BLO_write_struct_at_address(writer,
bNodeTree,
sce->nodetree,
BLO_write_get_id_buffer_temp_id(temp_embedded_id_buffer));
ntreeBlendWrite(
writer,
reinterpret_cast<bNodeTree *>(BLO_write_get_id_buffer_temp_id(temp_embedded_id_buffer)));
bNodeTree *temp_nodetree = reinterpret_cast<bNodeTree *>(
BLO_write_get_id_buffer_temp_id(temp_embedded_id_buffer));
/* Set deprecated chunksize for forward compatibility. */
temp_nodetree->chunksize = 256;
BLO_write_struct_at_address(writer, bNodeTree, sce->nodetree, temp_nodetree);
ntreeBlendWrite(writer, temp_nodetree);
}
BKE_color_managed_view_settings_blend_write(writer, &sce->view_settings);

View File

@ -681,11 +681,15 @@ typedef struct bNodeTree {
short edit_quality;
/** Quality setting when rendering. */
short render_quality;
/** Tile size for compositor engine. */
int chunksize DNA_DEPRECATED;
/** Execution mode to use for compositor engine. */
int execution_mode;
/** Execution mode to use for compositor engine. */
int precision;
char _pad[4];
rctf viewer_border;
/**