mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Merge branch 'master' into feature_sync_button
This commit is contained in:
commit
2bf6d071d1
44 changed files with 678 additions and 317 deletions
|
@ -1,9 +1,10 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from typing import List
|
||||
from cura.Machines.MaterialNode import MaterialNode #For type checking.
|
||||
|
||||
#
|
||||
# A MaterialGroup represents a group of material InstanceContainers that are derived from a single material profile.
|
||||
## A MaterialGroup represents a group of material InstanceContainers that are derived from a single material profile.
|
||||
# The main InstanceContainer which has the ID of the material profile file name is called the "root_material". For
|
||||
# example: "generic_abs" is the root material (ID) of "generic_abs_ultimaker3" and "generic_abs_ultimaker3_AA_0.4",
|
||||
# and "generic_abs_ultimaker3" and "generic_abs_ultimaker3_AA_0.4" are derived materials of "generic_abs".
|
||||
|
@ -17,11 +18,11 @@
|
|||
class MaterialGroup:
|
||||
__slots__ = ("name", "is_read_only", "root_material_node", "derived_material_node_list")
|
||||
|
||||
def __init__(self, name: str):
|
||||
def __init__(self, name: str, root_material_node: MaterialNode):
|
||||
self.name = name
|
||||
self.is_read_only = False
|
||||
self.root_material_node = None
|
||||
self.derived_material_node_list = []
|
||||
self.root_material_node = root_material_node
|
||||
self.derived_material_node_list = [] #type: List[MaterialNode]
|
||||
|
||||
def __str__(self) -> str:
|
||||
return "%s[%s]" % (self.__class__.__name__, self.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue