Skip to content

Commit

Permalink
Fixed bug on deleting frames from xml-frames
Browse files Browse the repository at this point in the history
  • Loading branch information
UncertainProd committed Jan 5, 2022
1 parent f32a398 commit e713e6d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/xmlpngengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,14 @@ def make_png_xml(frames, save_dir, character_name="Result", progressupdatefn=Non
f.data.xml_pose_name = final_pose_name

frame_dict_arr = []
current_img_hashes = set([x.data.img_hash for x in frames])
for imhash, img in imghashes.items():
frame_dict_arr.append({
"id": imhash,
"w": img.width,
"h": img.height
})
if imhash in current_img_hashes:
frame_dict_arr.append({
"id": imhash,
"w": img.width,
"h": img.height
})
frame_dict_arr.sort(key= lambda rect: rect.get("h", -100), reverse=True)

gp = GrowingPacker()
Expand Down

0 comments on commit e713e6d

Please sign in to comment.