mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 17:35:56 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
effddcbc5e
@ -22,6 +22,8 @@ catalog = i18nCatalog("cura")
|
|||||||
import numpy
|
import numpy
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
import UM.Settings.ContainerRegistry
|
||||||
|
|
||||||
|
|
||||||
# Setting for clearance around the prime
|
# Setting for clearance around the prime
|
||||||
PRIME_CLEARANCE = 10
|
PRIME_CLEARANCE = 10
|
||||||
@ -81,10 +83,6 @@ class BuildVolume(SceneNode):
|
|||||||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged)
|
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged)
|
||||||
self._onGlobalContainerStackChanged()
|
self._onGlobalContainerStackChanged()
|
||||||
|
|
||||||
self._active_extruder_stack = None
|
|
||||||
ExtruderManager.getInstance().activeExtruderChanged.connect(self._onActiveExtruderStackChanged)
|
|
||||||
self._onActiveExtruderStackChanged()
|
|
||||||
|
|
||||||
self._has_errors = False
|
self._has_errors = False
|
||||||
|
|
||||||
def setWidth(self, width):
|
def setWidth(self, width):
|
||||||
@ -215,11 +213,7 @@ class BuildVolume(SceneNode):
|
|||||||
minimum = Vector(min_w, min_h - 1.0, min_d),
|
minimum = Vector(min_w, min_h - 1.0, min_d),
|
||||||
maximum = Vector(max_w, max_h - self._raft_thickness, max_d))
|
maximum = Vector(max_w, max_h - self._raft_thickness, max_d))
|
||||||
|
|
||||||
bed_adhesion_size = 0.0
|
bed_adhesion_size = self._getBedAdhesionSize()
|
||||||
|
|
||||||
container_stack = Application.getInstance().getGlobalContainerStack()
|
|
||||||
if container_stack:
|
|
||||||
bed_adhesion_size = self._getBedAdhesionSize(container_stack)
|
|
||||||
|
|
||||||
# As this works better for UM machines, we only add the disallowed_area_size for the z direction.
|
# As this works better for UM machines, we only add the disallowed_area_size for the z direction.
|
||||||
# This is probably wrong in all other cases. TODO!
|
# This is probably wrong in all other cases. TODO!
|
||||||
@ -264,11 +258,17 @@ class BuildVolume(SceneNode):
|
|||||||
def _onGlobalContainerStackChanged(self):
|
def _onGlobalContainerStackChanged(self):
|
||||||
if self._global_container_stack:
|
if self._global_container_stack:
|
||||||
self._global_container_stack.propertyChanged.disconnect(self._onSettingPropertyChanged)
|
self._global_container_stack.propertyChanged.disconnect(self._onSettingPropertyChanged)
|
||||||
|
extruders = ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())
|
||||||
|
for extruder in extruders:
|
||||||
|
extruder.propertyChanged.disconnect(self._onSettingPropertyChanged)
|
||||||
|
|
||||||
self._global_container_stack = Application.getInstance().getGlobalContainerStack()
|
self._global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
|
||||||
if self._global_container_stack:
|
if self._global_container_stack:
|
||||||
self._global_container_stack.propertyChanged.connect(self._onSettingPropertyChanged)
|
self._global_container_stack.propertyChanged.connect(self._onSettingPropertyChanged)
|
||||||
|
extruders = ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())
|
||||||
|
for extruder in extruders:
|
||||||
|
extruder.propertyChanged.connect(self._onSettingPropertyChanged)
|
||||||
|
|
||||||
self._width = self._global_container_stack.getProperty("machine_width", "value")
|
self._width = self._global_container_stack.getProperty("machine_width", "value")
|
||||||
machine_height = self._global_container_stack.getProperty("machine_height", "value")
|
machine_height = self._global_container_stack.getProperty("machine_height", "value")
|
||||||
@ -285,13 +285,6 @@ class BuildVolume(SceneNode):
|
|||||||
|
|
||||||
self.rebuild()
|
self.rebuild()
|
||||||
|
|
||||||
def _onActiveExtruderStackChanged(self):
|
|
||||||
if self._active_extruder_stack:
|
|
||||||
self._active_extruder_stack.propertyChanged.disconnect(self._onSettingPropertyChanged)
|
|
||||||
self._active_extruder_stack = ExtruderManager.getInstance().getActiveExtruderStack()
|
|
||||||
if self._active_extruder_stack:
|
|
||||||
self._active_extruder_stack.propertyChanged.connect(self._onSettingPropertyChanged)
|
|
||||||
|
|
||||||
def _onSettingPropertyChanged(self, setting_key, property_name):
|
def _onSettingPropertyChanged(self, setting_key, property_name):
|
||||||
if property_name != "value":
|
if property_name != "value":
|
||||||
return
|
return
|
||||||
@ -364,7 +357,7 @@ class BuildVolume(SceneNode):
|
|||||||
[prime_x - PRIME_CLEARANCE, prime_y + PRIME_CLEARANCE],
|
[prime_x - PRIME_CLEARANCE, prime_y + PRIME_CLEARANCE],
|
||||||
])
|
])
|
||||||
|
|
||||||
bed_adhesion_size = self._getBedAdhesionSize(self._global_container_stack)
|
bed_adhesion_size = self._getBedAdhesionSize()
|
||||||
|
|
||||||
if disallowed_areas:
|
if disallowed_areas:
|
||||||
# Extend every area already in the disallowed_areas with the skirt size.
|
# Extend every area already in the disallowed_areas with the skirt size.
|
||||||
@ -425,8 +418,26 @@ class BuildVolume(SceneNode):
|
|||||||
self._has_errors = collision
|
self._has_errors = collision
|
||||||
self._disallowed_areas = areas
|
self._disallowed_areas = areas
|
||||||
|
|
||||||
|
## Private convenience function to get a setting from the correct extruder (as defined by limit_to_extruder property).
|
||||||
|
def _getSettingProperty(self, setting_key, property = "value"):
|
||||||
|
multi_extrusion = self._global_container_stack.getProperty("machine_extruder_count", "value") > 1
|
||||||
|
|
||||||
|
if not multi_extrusion:
|
||||||
|
return self._global_container_stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
|
extruder_index = self._global_container_stack.getProperty(setting_key, "limit_to_extruder")
|
||||||
|
if extruder_index == "-1": # If extruder index is -1 use global instead
|
||||||
|
return self._global_container_stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
|
extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)]
|
||||||
|
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0]
|
||||||
|
return stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
## Convenience function to calculate the size of the bed adhesion in directions x, y.
|
## Convenience function to calculate the size of the bed adhesion in directions x, y.
|
||||||
def _getBedAdhesionSize(self, container_stack):
|
def _getBedAdhesionSize(self):
|
||||||
|
if not self._global_container_stack:
|
||||||
|
return 0
|
||||||
|
container_stack = self._global_container_stack
|
||||||
skirt_size = 0.0
|
skirt_size = 0.0
|
||||||
|
|
||||||
# If we are printing one at a time, we need to add the bed adhesion size to the disallowed areas of the objects
|
# If we are printing one at a time, we need to add the bed adhesion size to the disallowed areas of the objects
|
||||||
@ -435,13 +446,13 @@ class BuildVolume(SceneNode):
|
|||||||
|
|
||||||
adhesion_type = container_stack.getProperty("adhesion_type", "value")
|
adhesion_type = container_stack.getProperty("adhesion_type", "value")
|
||||||
if adhesion_type == "skirt":
|
if adhesion_type == "skirt":
|
||||||
skirt_distance = container_stack.getProperty("skirt_gap", "value")
|
skirt_distance = self._getSettingProperty("skirt_gap", "value")
|
||||||
skirt_line_count = container_stack.getProperty("skirt_line_count", "value")
|
skirt_line_count = self._getSettingProperty("skirt_line_count", "value")
|
||||||
skirt_size = skirt_distance + (skirt_line_count * container_stack.getProperty("skirt_brim_line_width", "value"))
|
skirt_size = skirt_distance + (skirt_line_count * self._getSettingProperty("skirt_brim_line_width", "value"))
|
||||||
elif adhesion_type == "brim":
|
elif adhesion_type == "brim":
|
||||||
skirt_size = container_stack.getProperty("brim_line_count", "value") * container_stack.getProperty("skirt_brim_line_width", "value")
|
skirt_size = self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value")
|
||||||
elif adhesion_type == "raft":
|
elif adhesion_type == "raft":
|
||||||
skirt_size = container_stack.getProperty("raft_margin", "value")
|
skirt_size = self._getSettingProperty("raft_margin", "value")
|
||||||
|
|
||||||
if container_stack.getProperty("draft_shield_enabled", "value"):
|
if container_stack.getProperty("draft_shield_enabled", "value"):
|
||||||
skirt_size += container_stack.getProperty("draft_shield_dist", "value")
|
skirt_size += container_stack.getProperty("draft_shield_dist", "value")
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
from cura.Settings.ExtruderManager import ExtruderManager
|
||||||
from UM.Math.Polygon import Polygon
|
from UM.Math.Polygon import Polygon
|
||||||
from . import ConvexHullNode
|
from . import ConvexHullNode
|
||||||
|
|
||||||
|
import UM.Settings.ContainerRegistry
|
||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
## The convex hull decorator is a scene node decorator that adds the convex hull functionality to a scene node.
|
## The convex hull decorator is a scene node decorator that adds the convex hull functionality to a scene node.
|
||||||
@ -227,18 +229,15 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
# Add extra margin depending on adhesion type
|
# Add extra margin depending on adhesion type
|
||||||
adhesion_type = self._global_stack.getProperty("adhesion_type", "value")
|
adhesion_type = self._global_stack.getProperty("adhesion_type", "value")
|
||||||
extra_margin = 0
|
extra_margin = 0
|
||||||
machine_head_coords = numpy.array(
|
|
||||||
self._global_stack.getProperty("machine_head_with_fans_polygon", "value"),
|
|
||||||
numpy.float32)
|
|
||||||
|
|
||||||
if adhesion_type == "raft":
|
if adhesion_type == "raft":
|
||||||
extra_margin = max(0, self._global_stack.getProperty("raft_margin", "value"))
|
extra_margin = max(0, self._getSettingProperty("raft_margin", "value"))
|
||||||
elif adhesion_type == "brim":
|
elif adhesion_type == "brim":
|
||||||
extra_margin = max(0, self._global_stack.getProperty("brim_line_count", "value") * self._global_stack.getProperty("skirt_brim_line_width", "value"))
|
extra_margin = max(0, self._getSettingProperty("brim_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
|
||||||
elif adhesion_type == "skirt":
|
elif adhesion_type == "skirt":
|
||||||
extra_margin = max(
|
extra_margin = max(
|
||||||
0, self._global_stack.getProperty("skirt_gap", "value") +
|
0, self._getSettingProperty("skirt_gap", "value") +
|
||||||
self._global_stack.getProperty("skirt_line_count", "value") * self._global_stack.getProperty("skirt_brim_line_width", "value"))
|
self._getSettingPropertyy("skirt_line_count", "value") * self._getSettingProperty("skirt_brim_line_width", "value"))
|
||||||
|
|
||||||
# adjust head_and_fans with extra margin
|
# adjust head_and_fans with extra margin
|
||||||
if extra_margin > 0:
|
if extra_margin > 0:
|
||||||
@ -268,6 +267,9 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
if self._global_stack:
|
if self._global_stack:
|
||||||
self._global_stack.propertyChanged.disconnect(self._onSettingValueChanged)
|
self._global_stack.propertyChanged.disconnect(self._onSettingValueChanged)
|
||||||
self._global_stack.containersChanged.disconnect(self._onChanged)
|
self._global_stack.containersChanged.disconnect(self._onChanged)
|
||||||
|
extruders = ExtruderManager.getInstance().getMachineExtruders(self._global_stack.getId())
|
||||||
|
for extruder in extruders:
|
||||||
|
extruder.propertyChanged.disconnect(self._onSettingValueChanged)
|
||||||
|
|
||||||
self._global_stack = Application.getInstance().getGlobalContainerStack()
|
self._global_stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
|
||||||
@ -275,8 +277,27 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||||||
self._global_stack.propertyChanged.connect(self._onSettingValueChanged)
|
self._global_stack.propertyChanged.connect(self._onSettingValueChanged)
|
||||||
self._global_stack.containersChanged.connect(self._onChanged)
|
self._global_stack.containersChanged.connect(self._onChanged)
|
||||||
|
|
||||||
|
extruders = ExtruderManager.getInstance().getMachineExtruders(self._global_stack.getId())
|
||||||
|
for extruder in extruders:
|
||||||
|
extruder.propertyChanged.connect(self._onSettingValueChanged)
|
||||||
|
|
||||||
self._onChanged()
|
self._onChanged()
|
||||||
|
|
||||||
|
## Private convenience function to get a setting from the correct extruder (as defined by limit_to_extruder property).
|
||||||
|
def _getSettingProperty(self, setting_key, property="value"):
|
||||||
|
multi_extrusion = self._global_stack.getProperty("machine_extruder_count", "value") > 1
|
||||||
|
|
||||||
|
if not multi_extrusion:
|
||||||
|
return self._global_stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
|
extruder_index = self._global_stack.getProperty(setting_key, "limit_to_extruder")
|
||||||
|
if extruder_index == "-1": # If extruder index is -1 use global instead
|
||||||
|
return self._global_stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
|
extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)]
|
||||||
|
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id=extruder_stack_id)[0]
|
||||||
|
return stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
## Returns true if node is a descendent or the same as the root node.
|
## Returns true if node is a descendent or the same as the root node.
|
||||||
def __isDescendant(self, root, node):
|
def __isDescendant(self, root, node):
|
||||||
if node is None:
|
if node is None:
|
||||||
|
@ -77,7 +77,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: buildAreaWidthField
|
id: buildAreaWidthField
|
||||||
text: machineWidthProvider.properties.value
|
text: machineWidthProvider.properties.value
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: { machineWidthProvider.setPropertyValue("value", text); manager.forceUpdate() }
|
onEditingFinished: { machineWidthProvider.setPropertyValue("value", text); manager.forceUpdate() }
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
@ -93,7 +93,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: buildAreaDepthField
|
id: buildAreaDepthField
|
||||||
text: machineDepthProvider.properties.value
|
text: machineDepthProvider.properties.value
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: { machineDepthProvider.setPropertyValue("value", text); manager.forceUpdate() }
|
onEditingFinished: { machineDepthProvider.setPropertyValue("value", text); manager.forceUpdate() }
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
@ -109,7 +109,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: buildAreaHeightField
|
id: buildAreaHeightField
|
||||||
text: machineHeightProvider.properties.value
|
text: machineHeightProvider.properties.value
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: { machineHeightProvider.setPropertyValue("value", text); manager.forceUpdate() }
|
onEditingFinished: { machineHeightProvider.setPropertyValue("value", text); manager.forceUpdate() }
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
@ -182,7 +182,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: printheadXMinField
|
id: printheadXMinField
|
||||||
text: getHeadPolygonCoord("x", "min")
|
text: getHeadPolygonCoord("x", "min")
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: setHeadPolygon()
|
onEditingFinished: setHeadPolygon()
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
@ -198,7 +198,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: printheadYMinField
|
id: printheadYMinField
|
||||||
text: getHeadPolygonCoord("y", "min")
|
text: getHeadPolygonCoord("y", "min")
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: setHeadPolygon()
|
onEditingFinished: setHeadPolygon()
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
@ -214,7 +214,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: printheadXMaxField
|
id: printheadXMaxField
|
||||||
text: getHeadPolygonCoord("x", "max")
|
text: getHeadPolygonCoord("x", "max")
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: setHeadPolygon()
|
onEditingFinished: setHeadPolygon()
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
@ -230,7 +230,7 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
id: printheadYMaxField
|
id: printheadYMaxField
|
||||||
text: getHeadPolygonCoord("y", "max")
|
text: getHeadPolygonCoord("y", "max")
|
||||||
validator: RegExpValidator { regExp: /[0-9]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: setHeadPolygon()
|
onEditingFinished: setHeadPolygon()
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
|
@ -130,6 +130,7 @@ _setting_name_translations = {
|
|||||||
"remove_overlapping_walls_enabled": "travel_compensate_overlapping_walls_enabled",
|
"remove_overlapping_walls_enabled": "travel_compensate_overlapping_walls_enabled",
|
||||||
"remove_overlapping_walls_x_enabled": "travel_compensate_overlapping_walls_x_enabled",
|
"remove_overlapping_walls_x_enabled": "travel_compensate_overlapping_walls_x_enabled",
|
||||||
"retraction_hop": "retraction_hop_enabled",
|
"retraction_hop": "retraction_hop_enabled",
|
||||||
|
"skin_overlap": "infill_overlap",
|
||||||
"skirt_line_width": "skirt_brim_line_width",
|
"skirt_line_width": "skirt_brim_line_width",
|
||||||
"skirt_minimal_length": "skirt_brim_minimal_length",
|
"skirt_minimal_length": "skirt_brim_minimal_length",
|
||||||
"skirt_speed": "skirt_brim_speed",
|
"skirt_speed": "skirt_brim_speed",
|
||||||
@ -390,17 +391,18 @@ class VersionUpgrade21to22(VersionUpgrade):
|
|||||||
# \return The same dictionary.
|
# \return The same dictionary.
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def translateSettings(settings):
|
def translateSettings(settings):
|
||||||
|
new_settings = {}
|
||||||
for key, value in settings.items():
|
for key, value in settings.items():
|
||||||
if key in _removed_settings:
|
if key in _removed_settings:
|
||||||
del settings[key]
|
continue
|
||||||
elif key == "retraction_combing": #Combing was made into an enum instead of a boolean.
|
if key == "retraction_combing": #Combing was made into an enum instead of a boolean.
|
||||||
settings[key] = "off" if (value == "False") else "all"
|
new_settings[key] = "off" if (value == "False") else "all"
|
||||||
elif key in _setting_name_translations:
|
continue
|
||||||
del settings[key]
|
if key in _setting_name_translations:
|
||||||
settings[_setting_name_translations[key]] = value
|
new_settings[_setting_name_translations[key]] = value
|
||||||
if "infill_overlap" in settings: # New setting, added in 2.3
|
continue
|
||||||
settings["skin_overlap"] = settings["infill_overlap"]
|
new_settings[key] = value
|
||||||
return settings
|
return new_settings
|
||||||
|
|
||||||
## Translates a setting name for the change from Cura 2.1 to 2.2.
|
## Translates a setting name for the change from Cura 2.1 to 2.2.
|
||||||
#
|
#
|
||||||
|
@ -140,7 +140,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: Cura.ExtrudersModel { }
|
model: Cura.ExtrudersModel { simpleNames: true }
|
||||||
Menu {
|
Menu {
|
||||||
title: model.name
|
title: model.name
|
||||||
visible: machineExtruderCount.properties.value > 1
|
visible: machineExtruderCount.properties.value > 1
|
||||||
@ -641,8 +641,7 @@ UM.MainWindow
|
|||||||
//: File open dialog title
|
//: File open dialog title
|
||||||
title: catalog.i18nc("@title:window","Open file")
|
title: catalog.i18nc("@title:window","Open file")
|
||||||
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal;
|
modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal;
|
||||||
//TODO: Support multiple file selection, workaround bug in KDE file dialog
|
selectMultiple: true
|
||||||
//selectMultiple: true
|
|
||||||
nameFilters: UM.MeshFileHandler.supportedReadFileTypes;
|
nameFilters: UM.MeshFileHandler.supportedReadFileTypes;
|
||||||
folder: CuraApplication.getDefaultPath("dialog_load_path")
|
folder: CuraApplication.getDefaultPath("dialog_load_path")
|
||||||
onAccepted:
|
onAccepted:
|
||||||
@ -653,7 +652,12 @@ UM.MainWindow
|
|||||||
folder = f;
|
folder = f;
|
||||||
|
|
||||||
CuraApplication.setDefaultPath("dialog_load_path", folder);
|
CuraApplication.setDefaultPath("dialog_load_path", folder);
|
||||||
UM.MeshFileHandler.readLocalFile(fileUrl)
|
|
||||||
|
for(var i in fileUrls)
|
||||||
|
{
|
||||||
|
UM.MeshFileHandler.readLocalFile(fileUrls[i])
|
||||||
|
}
|
||||||
|
|
||||||
var meshName = backgroundItem.getMeshName(fileUrl.toString())
|
var meshName = backgroundItem.getMeshName(fileUrl.toString())
|
||||||
backgroundItem.hasMesh(decodeURIComponent(meshName))
|
backgroundItem.hasMesh(decodeURIComponent(meshName))
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,14 @@ Menu
|
|||||||
{
|
{
|
||||||
id: automaticMaterial
|
id: automaticMaterial
|
||||||
text:
|
text:
|
||||||
|
{
|
||||||
|
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex)
|
||||||
{
|
{
|
||||||
var materialName = Cura.MachineManager.printerOutputDevices[0].materialNames[extruderIndex];
|
var materialName = Cura.MachineManager.printerOutputDevices[0].materialNames[extruderIndex];
|
||||||
return catalog.i18nc("@title:menuitem %1 is the value from the printer", "Automatic: %1").arg(materialName);
|
return catalog.i18nc("@title:menuitem %1 is the value from the printer", "Automatic: %1").arg(materialName);
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex
|
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
|
@ -19,10 +19,14 @@ Menu
|
|||||||
{
|
{
|
||||||
id: automaticNozzle
|
id: automaticNozzle
|
||||||
text:
|
text:
|
||||||
|
{
|
||||||
|
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex)
|
||||||
{
|
{
|
||||||
var nozzleName = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
|
var nozzleName = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
|
||||||
return catalog.i18nc("@title:menuitem %1 is the value from the printer", "Automatic: %1").arg(nozzleName);
|
return catalog.i18nc("@title:menuitem %1 is the value from the printer", "Automatic: %1").arg(nozzleName);
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex
|
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
|
@ -207,6 +207,7 @@ UM.ManagementPage
|
|||||||
anchors.topMargin: UM.Theme.getSize("default_margin").width
|
anchors.topMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
spacing: UM.Theme.getSize("default_margin").width
|
spacing: UM.Theme.getSize("default_margin").width
|
||||||
|
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId
|
||||||
|
|
||||||
Component.onCompleted:
|
Component.onCompleted:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user