mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Revamped ChangeAtZ
Adjusted coding style to use spaces instead of tabs
This commit is contained in:
parent
6c22a5ed06
commit
bcc12030a2
1 changed files with 736 additions and 737 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue