mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -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
|
# this was broken up into a separate class so the main ChangeZ script could be debugged outside of Cura
|
||||||
class ChangeAtZ(Script):
|
class ChangeAtZ(Script):
|
||||||
|
|
||||||
version = "5.2.0"
|
version = "5.2.0"
|
||||||
|
|
||||||
def getSettingDataString(self):
|
def getSettingDataString(self):
|
||||||
|
@ -380,10 +379,10 @@ class ChangeAtZ(Script):
|
||||||
except:
|
except:
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
# The primary ChangeAtZ class that does all the gcode editing. This was broken out into an
|
# 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
|
# independent class so it could be debugged using a standard IDE
|
||||||
class ChangeAtZProcessor:
|
class ChangeAtZProcessor:
|
||||||
|
|
||||||
TargetValues = {}
|
TargetValues = {}
|
||||||
IsApplyToSingleLayer = False
|
IsApplyToSingleLayer = False
|
||||||
LastE = None
|
LastE = None
|
||||||
|
@ -607,7 +606,7 @@ class ChangeAtZProcessor:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getValue(line, key, default=None):
|
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
|
return default
|
||||||
|
|
||||||
sub_part = line[line.find(key) + len(key):] # allows for string lengths larger than 1
|
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