mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Add profile reader plug-in type
This type of plug-in will load a file as an instance container of the user profile type. Contributes to issue CURA-1278.
This commit is contained in:
parent
85ce8a719e
commit
5a28eca203
1 changed files with 17 additions and 0 deletions
17
cura/ProfileReader.py
Normal file
17
cura/ProfileReader.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Copyright (c) 2016 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
|
from UM.PluginObject import PluginObject
|
||||||
|
|
||||||
|
## A type of plug-ins that reads profiles from a file.
|
||||||
|
#
|
||||||
|
# The profile is then stored as instance container of the type user profile.
|
||||||
|
class ProfileReader(PluginObject):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
## Read profile data from a file and return a filled profile.
|
||||||
|
#
|
||||||
|
# \return \type{Profile} The profile that was obtained from the file.
|
||||||
|
def read(self, file_name):
|
||||||
|
raise NotImplementedError("Profile reader plug-in was not correctly implemented. The read function was not implemented.")
|
Loading…
Add table
Add a link
Reference in a new issue