mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Move ProfileReader and ProfileWriter over to Cura itself.
Contributes to CURA-1667 Profile import/export
This commit is contained in:
parent
c03588c6e5
commit
97d64a0749
3 changed files with 29 additions and 5 deletions
25
cura/ProfileWriter.py
Normal file
25
cura/ProfileWriter.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Copyright (c) 2015 Ultimaker B.V.
|
||||
# Uranium is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
from UM.PluginObject import PluginObject
|
||||
|
||||
## Base class for profile writer plugins.
|
||||
#
|
||||
# This class defines a write() function to write profiles to files with.
|
||||
class ProfileWriter(PluginObject):
|
||||
## Initialises the profile writer.
|
||||
#
|
||||
# This currently doesn't do anything since the writer is basically static.
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
## Writes a profile to the specified file path.
|
||||
#
|
||||
# The profile writer may write its own file format to the specified file.
|
||||
#
|
||||
# \param path \type{string} The file to output to.
|
||||
# \param profile \type{Profile} The profile to write to the file.
|
||||
# \return \code True \endcode if the writing was successful, or \code
|
||||
# False \endcode if it wasn't.
|
||||
def write(self, path, node):
|
||||
raise NotImplementedError("Profile writer plugin was not correctly implemented. No write was specified.")
|
Loading…
Add table
Add a link
Reference in a new issue