mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Revert "Make serialisation version static"
This reverts commit 1771aafddb5082f51728b69f66862880701b4965. Contributes to issue CURA-34.
This commit is contained in:
parent
63bdb08ec2
commit
541873ae6e
1 changed files with 2 additions and 8 deletions
|
@ -9,12 +9,6 @@ import re #For escaping characters in the settings.
|
||||||
|
|
||||||
|
|
||||||
class GCodeWriter(MeshWriter):
|
class GCodeWriter(MeshWriter):
|
||||||
## Serialisation version ID of the settings that get serialised in g-code.
|
|
||||||
#
|
|
||||||
# If the format of settings is modified in any way that breaks backwards
|
|
||||||
# compatibility, this version number must be incremented.
|
|
||||||
settings_version_id = 1
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
@ -42,8 +36,8 @@ class GCodeWriter(MeshWriter):
|
||||||
# \param profile The profile to serialise.
|
# \param profile The profile to serialise.
|
||||||
# \return A serialised string of the profile.
|
# \return A serialised string of the profile.
|
||||||
def _serialiseProfile(self, profile):
|
def _serialiseProfile(self, profile):
|
||||||
#IF YOU CHANGE THIS FUNCTION IN A WAY THAT BREAKS REVERSE COMPATIBILITY, INCREMENT settings_version_id!
|
version = 1 #IF YOU CHANGE THIS FUNCTION IN A WAY THAT BREAKS REVERSE COMPATIBILITY, INCREMENT THIS VERSION NUMBER!
|
||||||
prefix = ";SETTING_" + str(self.settings_version_id) + " " #The prefix to put before each line.
|
prefix = ";SETTING_" + str(version) + " " #The prefix to put before each line.
|
||||||
|
|
||||||
serialised = profile.serialise()
|
serialised = profile.serialise()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue