From 64544f3c4154520004800674494b3acd6a3cff00 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Wed, 11 Jan 2023 16:00:15 -0500 Subject: [PATCH] Cleanup --- opendm/objpacker/imagepacker/imagepacker.py | 3 +-- opendm/objpacker/imagepacker/utils.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/opendm/objpacker/imagepacker/imagepacker.py b/opendm/objpacker/imagepacker/imagepacker.py index a0a589b2..9031d28d 100644 --- a/opendm/objpacker/imagepacker/imagepacker.py +++ b/opendm/objpacker/imagepacker/imagepacker.py @@ -24,7 +24,6 @@ import rasterio import numpy as np -#from PIL import Image, ImageDraw import math # Based off of the great writeup, demo and code at: @@ -204,7 +203,7 @@ def pack(obj, background=(0,0,0,0), format="PNG", extents=None): # using filename so we can pass back UV info without storing it in image blocks.append(Block(w, h, data=(filename, mat, changes))) - +use_3dmesh # sort by width, descending (widest first) blocks.sort(key=lambda block: -block.w) diff --git a/opendm/objpacker/imagepacker/utils.py b/opendm/objpacker/imagepacker/utils.py index 072d27d4..8124648c 100644 --- a/opendm/objpacker/imagepacker/utils.py +++ b/opendm/objpacker/imagepacker/utils.py @@ -29,8 +29,6 @@ class AABB(): self.max_x = max_x self.max_y = max_y - self.to_tile = False # TODO: remove? - def add(self, x,y): self.min_x = min(self.min_x, x) if self.min_x is not None else x self.min_y = min(self.min_y, y) if self.min_y is not None else y