From e5d78a9356717dc6ae2c6a73c88982046d315f62 Mon Sep 17 00:00:00 2001 From: Pepper Date: Fri, 19 May 2023 23:30:08 +0000 Subject: python3 --- photoblaster/modules/pbgrid/__init__.py | 15 +++++++++------ photoblaster/param/int_.py | 2 +- share/frontend/im/api.html | 2 +- share/frontend/im/css/style.css | 4 ++-- share/frontend/im/index.html | 12 ++++++------ share/frontend/imconcat/index.html | 9 +++------ share/frontend/imthresh/index.html | 28 ++++++++++++++-------------- 7 files changed, 36 insertions(+), 36 deletions(-) diff --git a/photoblaster/modules/pbgrid/__init__.py b/photoblaster/modules/pbgrid/__init__.py index d2d7613..a9ab094 100755 --- a/photoblaster/modules/pbgrid/__init__.py +++ b/photoblaster/modules/pbgrid/__init__.py @@ -3,6 +3,7 @@ from photoblaster.config import DEFAULT_FINALFORMAT, DEFAULT_HEIGHT,\ THREEDROTATE, GRID, BIN_CONVERT, BIN_COMPOSITE from photoblaster.modules import ModuleBase from photoblaster._file import File +import sys _DEFAULT_LINE_COLOR = "silver" @@ -89,14 +90,14 @@ class PbGrid(ModuleBase): ) self._db_url_param = str( - filter( + list(filter( lambda n: n, [ self.params.imageinstead, self.params.planebgimage, self.params.bgimage, "NULL" ] - )[0] + ))[0] ) def _init_canvas(self): @@ -149,13 +150,15 @@ class PbGrid(ModuleBase): #3rd step--run 3Drotate cmd = [THREEDROTATE] if self.params.swing: - cmd += ["pan={}".format(self.params.swing)] + print(self.params.swing) + sys.exit() + cmd += ["pan={}".format(self.params.get("swing", 0))] if self.params.tilt: - cmd += ["tilt={}".format(self.params.tilt)] + cmd += ["tilt={}".format(self.params.get("tilt", 0))] if self.params.roll: - cmd += ["roll={}".format(self.params.roll)] + cmd += ["roll={}".format(self.params.get("roll", 0))] if self.params.zoom: - cmd += ["zoom={}".format(self.params.zoom)] + cmd += ["zoom={}".format(self.params.get("zoom", 0))] if cmd == [THREEDROTATE]: # if nothing has been added return if self.params.planebgcolor and not self.params.planebgimage: diff --git a/photoblaster/param/int_.py b/photoblaster/param/int_.py index 6e6d066..eb42e7f 100644 --- a/photoblaster/param/int_.py +++ b/photoblaster/param/int_.py @@ -13,7 +13,7 @@ class Int(Param): if value: self.value = int(value) else: - self.value = "" + self.value = 0 except Exception as e: self.err_warn("Not an int: %s" % str(value)) self.err_warn(str(e)) diff --git a/share/frontend/im/api.html b/share/frontend/im/api.html index 2ea9d75..1bb461f 100755 --- a/share/frontend/im/api.html +++ b/share/frontend/im/api.html @@ -28,7 +28,7 @@ body { - + diff --git a/share/frontend/imconcat/index.html b/share/frontend/imconcat/index.html index 909d2e0..f3966b7 100644 --- a/share/frontend/imconcat/index.html +++ b/share/frontend/imconcat/index.html @@ -3,12 +3,9 @@ Photoblaster Concatenate - - - - - - + + +