From 63d007c02ca52cb31ef8fa702694920ceb106fb9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 15 Dec 2015 11:44:29 +0100 Subject: [PATCH] Rename GCodeReader to GCodeProfileReader The new name is more appropriate since it reads only the profiles from the g-code. In the future there might be some other plug-in that reads the actual g-code as for instance a mesh. Contributes to issue CURA-34. --- .../GCodeProfileReader.py} | 4 ++-- plugins/{GCodeReader => GCodeProfileReader}/__init__.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename plugins/{GCodeReader/GCodeReader.py => GCodeProfileReader/GCodeProfileReader.py} (94%) rename plugins/{GCodeReader => GCodeProfileReader}/__init__.py (76%) diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeProfileReader/GCodeProfileReader.py similarity index 94% rename from plugins/GCodeReader/GCodeReader.py rename to plugins/GCodeProfileReader/GCodeProfileReader.py index 3c528c020b..fd6a7152eb 100644 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeProfileReader/GCodeProfileReader.py @@ -2,7 +2,7 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.Application import Application #To get the current profile that should be updated with the settings from the g-code. -from UM.Mesh.MeshReader import MeshReader +from UM.Settings.ProfileReader import ProfileReader import re #Regular expressions for parsing escape characters in the settings. ## A class that reads profile data from g-code files. @@ -10,7 +10,7 @@ import re #Regular expressions for parsing escape characters in the settings. # It reads the profile data from g-code files and stores the profile as a new # profile, and then immediately activates that profile. # This class currently does not process the rest of the g-code in any way. -class GCodeReader(MeshReader): +class GCodeProfileReader(ProfileReader): ## Initialises the g-code reader as a mesh reader. def __init__(self): super().__init__() diff --git a/plugins/GCodeReader/__init__.py b/plugins/GCodeProfileReader/__init__.py similarity index 76% rename from plugins/GCodeReader/__init__.py rename to plugins/GCodeProfileReader/__init__.py index f78024d3d3..a5ebb074c8 100644 --- a/plugins/GCodeReader/__init__.py +++ b/plugins/GCodeProfileReader/__init__.py @@ -1,7 +1,7 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. -from . import GCodeReader +from . import GCodeProfileReader from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") @@ -17,9 +17,9 @@ def getMetaData(): }, "profile_reader": { "extension": "gcode", - "description": catalog.i18nc("@item:inlistbox", "Gcode File") + "description": catalog.i18nc("@item:inlistbox", "G-code File") } } def register(app): - return { "profile_reader": GCodeReader.GCodeReader() } + return { "profile_reader": GCodeProfileReader.GCodeProfileReader() }