Cleanup: Use utility to write palette color list

This commit is contained in:
Hans Goudey 2022-08-23 11:19:07 -04:00
parent b649fc13ed
commit 59aef1d717
1 changed files with 1 additions and 4 deletions

View File

@ -95,13 +95,10 @@ static void palette_blend_write(BlendWriter *writer, ID *id, const void *id_addr
{
Palette *palette = (Palette *)id;
PaletteColor *color;
BLO_write_id_struct(writer, Palette, id_address, &palette->id);
BKE_id_blend_write(writer, &palette->id);
for (color = palette->colors.first; color; color = color->next) {
BLO_write_struct(writer, PaletteColor, color);
}
BLO_write_struct_list(writer, PaletteColor, &palette->colors);
}
static void palette_blend_read_data(BlendDataReader *reader, ID *id)