diff --git a/plotter-lod.inx b/plotter-lod.inx
index 6f5d67c..2e3a092 100644
--- a/plotter-lod.inx
+++ b/plotter-lod.inx
@@ -3,7 +3,7 @@
<_name>LY Drawbot tool by Love Open Design
love-open-design.com
plotter-lod.py
- inkex.py
+ inkex
M03
M05
diff --git a/plotter-lod.py b/plotter-lod.py
index c3736e0..c2c9b2d 100644
--- a/plotter-lod.py
+++ b/plotter-lod.py
@@ -804,6 +804,8 @@ class LaserGcode(inkex.Effect):
def check_dir(self):
+ if not self.options.directory:
+ self.options.directory = os.getcwd() + "/"
if self.options.directory[-1] not in ["/", "\\"]:
if "\\" in self.options.directory:
self.options.directory += "\\"
@@ -938,7 +940,7 @@ class LaserGcode(inkex.Effect):
if 'transform' in list(g.keys()):
t = g.get('transform')
t = [list(row) for row in Transform(t).matrix]
- trans = [list(row) for row in (Transform(t) * Transform(trans)).matrix] if trans != [] else t
+ trans = [list(row) for row in (Transform(t) @ Transform(trans)).matrix] if trans != [] else t
print_(trans)
g = g.getparent()
return trans
@@ -1072,15 +1074,15 @@ class LaserGcode(inkex.Effect):
active_layer_already_has_tool
active_layer_already_has_orientation_points
"""
- if type_.lower() in re.split("[\s\n,\.]+", errors.lower()):
+ if type_.lower() in re.split(r"[\s\n,\.]+", errors.lower()):
print_(s)
inkex.errormsg(s + "\n")
sys.exit()
- elif type_.lower() in re.split("[\s\n,\.]+", warnings.lower()):
+ elif type_.lower() in re.split(r"[\s\n,\.]+", warnings.lower()):
print_(s)
if not self.options.suppress_all_messages:
inkex.errormsg(s + "\n")
- elif type_.lower() in re.split("[\s\n,\.]+", notes.lower()):
+ elif type_.lower() in re.split(r"[\s\n,\.]+", notes.lower()):
print_(s)
else:
print_(s)
@@ -1202,7 +1204,7 @@ class LaserGcode(inkex.Effect):
for path in self.selected_paths[layer]:
if self.options.dxfpoints_action == 'replace':
path.set("dxfpoint", "1")
- r = re.match("^\s*.\s*(\S+)", path.get("d"))
+ r = re.match(r"^\s*.\s*(\S+)", path.get("d"))
if r != None:
print_(("got path=", r.group(1)))
path.set("d",
@@ -1429,6 +1431,8 @@ class LaserGcode(inkex.Effect):
options.doc_root = self.document.getroot()
# define print_ function
global print_
+ self.options.log_create_log = True # Force enable for verbose logging
+ self.options.log_filename = os.path.expanduser("~/log.log")
if self.options.log_create_log:
try:
if os.path.isfile(self.options.log_filename): os.remove(self.options.log_filename)