Solved merge conflict

This commit is contained in:
Jack Ha 2018-03-12 11:39:39 +01:00
commit aa3cd8ba9d
5 changed files with 22 additions and 7 deletions

View file

@ -988,11 +988,21 @@ class MachineManager(QObject):
def activeMaterialsCompatible(self):
# check material - variant compatibility
result = True
machine_has_buildplate = Util.parseBool(self._global_container_stack.getMetaDataEntry("has_variant_buildplates", False))
if Util.parseBool(self._global_container_stack.getMetaDataEntry("has_materials", False)):
for position, extruder in self._global_container_stack.extruders.items():
if extruder.isEnabled and not extruder.material.getMetaDataEntry("compatible"):
return False
return True
result = False
break
if machine_has_buildplate:
buildplate_compatibility_dict = extruder.material.getMetaDataEntry("buildplate_compatible")
if buildplate_compatibility_dict:
buildplate_name = self._global_container_stack.variant.getName()
result = buildplate_compatibility_dict.get(buildplate_name, True)
if not result:
break
return result
## Update current quality type and machine after setting material
def _updateQualityWithMaterial(self):

View file

@ -244,6 +244,7 @@ Cura.MachineAction
height: childrenRect.height
width: childrenRect.width
text: machineExtruderCountProvider.properties.description
visible: extruderCountModel.count >= 2
Row
{

View file

@ -173,7 +173,10 @@ class PostProcessingPlugin(QObject, Extension):
Logger.log("d", "Creating post processing plugin view.")
## Load all scripts in the scripts folders
for root in [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Preferences)]:
# The PostProcessingPlugin path is for built-in scripts.
# The Resources path is where the user should store custom scripts.
# The Preferences path is legacy, where the user may previously have stored scripts.
for root in [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Resources), Resources.getStoragePath(Resources.Preferences)]:
path = os.path.join(root, "scripts")
if not os.path.isdir(path):
try:

View file

@ -617,7 +617,8 @@ class XmlMaterialProfile(InstanceContainer):
from cura.Machines.VariantManager import VariantType
variant_manager = CuraApplication.getInstance().getVariantManager()
variant_node = variant_manager.getVariantNode(machine_id, buildplate_id)
variant_node = variant_manager.getVariantNode(machine_id, buildplate_id,
variant_type = VariantType.BUILD_PLATE)
if not variant_node:
continue