Revamped ChangeAtZ

Adjusted coding style to use spaces instead of tabs
This commit is contained in:
novamxd 2020-01-03 19:01:33 -06:00
parent 6c22a5ed06
commit bcc12030a2

View file

@ -52,7 +52,6 @@ import re
# this was broken up into a separate class so the main ChangeZ script could be debugged outside of Cura
class ChangeAtZ(Script):
version = "5.2.0"
def getSettingDataString(self):
@ -380,10 +379,10 @@ class ChangeAtZ(Script):
except:
return default
# The primary ChangeAtZ class that does all the gcode editing. This was broken out into an
# independent class so it could be debugged using a standard IDE
class ChangeAtZProcessor:
TargetValues = {}
IsApplyToSingleLayer = False
LastE = None
@ -607,7 +606,7 @@ class ChangeAtZProcessor:
@staticmethod
def getValue(line, key, default=None):
if not key in line or (";" in line and line.find(key) > line.find(";") and not ";ChangeAtZ" in key and not ";LAYER:" in key):
if key not in line or (";" in line and line.find(key) > line.find(";") and ";ChangeAtZ" not in key and ";LAYER:" not in key):
return default
sub_part = line[line.find(key) + len(key):] # allows for string lengths larger than 1