Skip to content

Commit

Permalink
Fix saving masks
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Jan 4, 2025
1 parent 506db62 commit 721e05d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions base/sources/util_encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@ function util_encode_layer_data_size(datas: layer_data_t[]): i32 {
let size: i32 = 0;
for (let i: i32 = 0; i < datas.length; ++i) {
let tp: buffer_t = datas[i].texpaint;
size += tp.length;

let tp_nor: buffer_t = datas[i].texpaint_nor;
if (tp_nor != null) {
size += tp_nor.length;
}

let tp_pack: buffer_t = datas[i].texpaint_pack;
size += tp.length;
size += tp_nor.length;
size += tp_pack.length;
if (tp_pack != null) {
size += tp_pack.length;
}
}
return size;
}
Expand Down

0 comments on commit 721e05d

Please sign in to comment.