mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:58:58 +08:00
Merge branch 'master' into CURA-4447_UPDATE_INSTANCE_CONTAINER
This commit is contained in:
commit
e24242dc3c
@ -10,6 +10,6 @@ TryExec=@CMAKE_INSTALL_FULL_BINDIR@/cura
|
||||
Icon=cura-icon
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;
|
||||
MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml;
|
||||
Categories=Graphics;
|
||||
Keywords=3D;Printing;
|
||||
|
@ -62,7 +62,7 @@ class CuraSplashScreen(QSplashScreen):
|
||||
painter.setFont(font)
|
||||
painter.drawText(215, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0])
|
||||
if len(version) > 1:
|
||||
font.setPointSize(12)
|
||||
font.setPixelSize(16)
|
||||
painter.setFont(font)
|
||||
painter.setPen(QColor(200, 200, 200, 255))
|
||||
painter.drawText(247, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1])
|
||||
|
@ -12,11 +12,14 @@ class SimpleModeSettingsManager(QObject):
|
||||
super().__init__(parent)
|
||||
|
||||
self._machine_manager = Application.getInstance().getMachineManager()
|
||||
self._is_profile_customized = False
|
||||
self._is_profile_customized = False # True when default profile has user changes
|
||||
self._is_profile_user_created = False # True when profile was custom created by user
|
||||
|
||||
self._machine_manager.activeStackValueChanged.connect(self._updateIsProfileCustomized)
|
||||
self._machine_manager.activeQualityChanged.connect(self._updateIsProfileUserCreated)
|
||||
|
||||
isProfileCustomizedChanged = pyqtSignal()
|
||||
isProfileUserCreatedChanged = pyqtSignal()
|
||||
|
||||
@pyqtProperty(bool, notify = isProfileCustomizedChanged)
|
||||
def isProfileCustomized(self):
|
||||
@ -32,11 +35,13 @@ class SimpleModeSettingsManager(QObject):
|
||||
|
||||
# check user settings in the global stack
|
||||
user_setting_keys.update(set(global_stack.userChanges.getAllKeys()))
|
||||
|
||||
# check user settings in the extruder stacks
|
||||
if global_stack.extruders:
|
||||
for extruder_stack in global_stack.extruders.values():
|
||||
user_setting_keys.update(set(extruder_stack.userChanges.getAllKeys()))
|
||||
|
||||
# remove settings that are visible in recommended (we don't show the reset button for those)
|
||||
for skip_key in self.__ignored_custom_setting_keys:
|
||||
if skip_key in user_setting_keys:
|
||||
user_setting_keys.remove(skip_key)
|
||||
@ -47,6 +52,33 @@ class SimpleModeSettingsManager(QObject):
|
||||
self._is_profile_customized = has_customized_user_settings
|
||||
self.isProfileCustomizedChanged.emit()
|
||||
|
||||
@pyqtProperty(bool, notify = isProfileUserCreatedChanged)
|
||||
def isProfileUserCreated(self):
|
||||
return self._is_profile_user_created
|
||||
|
||||
def _updateIsProfileUserCreated(self):
|
||||
quality_changes_keys = set()
|
||||
|
||||
if not self._machine_manager.activeMachine:
|
||||
return False
|
||||
|
||||
global_stack = self._machine_manager.activeMachine
|
||||
|
||||
# check quality changes settings in the global stack
|
||||
quality_changes_keys.update(set(global_stack.qualityChanges.getAllKeys()))
|
||||
|
||||
# check quality changes settings in the extruder stacks
|
||||
if global_stack.extruders:
|
||||
for extruder_stack in global_stack.extruders.values():
|
||||
quality_changes_keys.update(set(extruder_stack.qualityChanges.getAllKeys()))
|
||||
|
||||
# check if the qualityChanges container is not empty (meaning it is a user created profile)
|
||||
has_quality_changes = len(quality_changes_keys) > 0
|
||||
|
||||
if has_quality_changes != self._is_profile_user_created:
|
||||
self._is_profile_user_created = has_quality_changes
|
||||
self.isProfileUserCreatedChanged.emit()
|
||||
|
||||
# These are the settings included in the Simple ("Recommended") Mode, so only when the other settings have been
|
||||
# changed, we consider it as a user customized profile in the Simple ("Recommended") Mode.
|
||||
__ignored_custom_setting_keys = ["support_enable",
|
||||
|
@ -26,7 +26,7 @@ class PluginBrowser(QObject, Extension):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self._api_version = 1
|
||||
self._api_version = 2
|
||||
self._api_url = "http://software.ultimaker.com/cura/v%s/" % self._api_version
|
||||
|
||||
self._plugin_list_request = None
|
||||
|
@ -509,8 +509,6 @@ class XmlMaterialProfile(InstanceContainer):
|
||||
elif key in self.__unmapped_settings:
|
||||
if key == "hardware compatible":
|
||||
common_compatibility = self._parseCompatibleValue(entry.text)
|
||||
else:
|
||||
Logger.log("d", "Unsupported material setting %s", key)
|
||||
self._cached_values = common_setting_values # from InstanceContainer ancestor
|
||||
|
||||
meta_data["compatible"] = common_compatibility
|
||||
@ -676,7 +674,9 @@ class XmlMaterialProfile(InstanceContainer):
|
||||
"processing temperature graph": "material_flow_temp_graph",
|
||||
"print cooling": "cool_fan_speed",
|
||||
"retraction amount": "retraction_amount",
|
||||
"retraction speed": "retraction_speed"
|
||||
"retraction speed": "retraction_speed",
|
||||
"adhesion tendency": "material_adhesion_tendency",
|
||||
"surface energy": "material_surface_energy"
|
||||
}
|
||||
__unmapped_settings = [
|
||||
"hardware compatible"
|
||||
|
@ -7,7 +7,8 @@
|
||||
"visible": true,
|
||||
"author": "Michael Wildermuth",
|
||||
"manufacturer": "Creality3D",
|
||||
"file_formats": "text/x-gcode"
|
||||
"file_formats": "text/x-gcode",
|
||||
"preferred_quality": "*Draft*"
|
||||
},
|
||||
"overrides": {
|
||||
"machine_width": {
|
||||
@ -25,9 +26,6 @@
|
||||
"machine_nozzle_size": {
|
||||
"default_value": 0.4
|
||||
},
|
||||
"layer_height": {
|
||||
"default_value": 0.2
|
||||
},
|
||||
"layer_height_0": {
|
||||
"default_value": 0.2
|
||||
},
|
||||
|
0
resources/definitions/dagoma_discoeasy200.def.json
Executable file → Normal file
0
resources/definitions/dagoma_discoeasy200.def.json
Executable file → Normal file
37
resources/definitions/fdmprinter.def.json
Executable file → Normal file
37
resources/definitions/fdmprinter.def.json
Executable file → Normal file
@ -643,6 +643,20 @@
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
},
|
||||
"slicing_tolerance":
|
||||
{
|
||||
"label": "Slicing Tolerance",
|
||||
"description": "How to slice layers with diagonal surfaces. The areas of a layer can be generated based on where the middle of the layer intersects the surface (Middle). Alternatively each layer can have the areas which fall inside of the volume throughout the height of the layer (Exclusive) or a layer has the areas which fall inside anywhere within the layer (Inclusive). Exclusive retains the most details, Inclusive makes for the best fit and Middle takes the least time to process.",
|
||||
"type": "enum",
|
||||
"options":
|
||||
{
|
||||
"middle": "Middle",
|
||||
"exclusive": "Exclusive",
|
||||
"inclusive": "Inclusive"
|
||||
},
|
||||
"default_value": "middle",
|
||||
"settable_per_mesh": true
|
||||
},
|
||||
"line_width":
|
||||
{
|
||||
"label": "Line Width",
|
||||
@ -1850,6 +1864,29 @@
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"material_adhesion_tendency":
|
||||
{
|
||||
"label": "Adhesion Tendency",
|
||||
"description": "Surface adhesion tendency.",
|
||||
"type": "int",
|
||||
"default_value": 10,
|
||||
"minimum_value": "0",
|
||||
"maximum_value": "10",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"material_surface_energy":
|
||||
{
|
||||
"label": "Surface Energy",
|
||||
"description": "Surface energy.",
|
||||
"unit": "%",
|
||||
"type": "int",
|
||||
"default_value": 100,
|
||||
"minimum_value": "0",
|
||||
"maximum_value": "100",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"material_flow":
|
||||
{
|
||||
"label": "Flow",
|
||||
|
0
resources/definitions/helloBEEprusa.def.json
Executable file → Normal file
0
resources/definitions/helloBEEprusa.def.json
Executable file → Normal file
0
resources/extruders/hBp_extruder_left.def.json
Executable file → Normal file
0
resources/extruders/hBp_extruder_left.def.json
Executable file → Normal file
0
resources/extruders/hBp_extruder_right.def.json
Executable file → Normal file
0
resources/extruders/hBp_extruder_right.def.json
Executable file → Normal file
0
resources/meshes/BEEVERYCREATIVE-helloBEEprusa.stl
Executable file → Normal file
0
resources/meshes/BEEVERYCREATIVE-helloBEEprusa.stl
Executable file → Normal file
0
resources/qml/Actions.qml
Executable file → Normal file
0
resources/qml/Actions.qml
Executable file → Normal file
0
resources/qml/Cura.qml
Executable file → Normal file
0
resources/qml/Cura.qml
Executable file → Normal file
0
resources/qml/Menus/ContextMenu.qml
Executable file → Normal file
0
resources/qml/Menus/ContextMenu.qml
Executable file → Normal file
0
resources/qml/Preferences/GeneralPage.qml
Executable file → Normal file
0
resources/qml/Preferences/GeneralPage.qml
Executable file → Normal file
0
resources/qml/Sidebar.qml
Executable file → Normal file
0
resources/qml/Sidebar.qml
Executable file → Normal file
@ -34,20 +34,6 @@ Column
|
||||
width: height
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
}
|
||||
visible: extruderSelectionRow.visible
|
||||
height: UM.Theme.getSize("default_lining").hieght
|
||||
width: height
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: extruderSelectionRow
|
||||
@ -291,10 +277,10 @@ Column
|
||||
}
|
||||
}
|
||||
|
||||
// Print core row
|
||||
//Variant row
|
||||
Item
|
||||
{
|
||||
id: printCoreRow
|
||||
id: variantRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
visible: Cura.MachineManager.hasVariants && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
|
||||
@ -308,7 +294,7 @@ Column
|
||||
|
||||
Label
|
||||
{
|
||||
id: printCoreLabel
|
||||
id: variantLabel
|
||||
text: Cura.MachineManager.activeDefinitionVariantsName;
|
||||
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||
font: UM.Theme.getFont("default");
|
||||
@ -316,7 +302,7 @@ Column
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
id: printCoreSelection
|
||||
id: variantSelection
|
||||
text: Cura.MachineManager.activeVariantName
|
||||
tooltip: Cura.MachineManager.activeVariantName;
|
||||
visible: Cura.MachineManager.hasVariants
|
||||
|
@ -89,14 +89,14 @@ Item
|
||||
var availableMin = -1
|
||||
var availableMax = -1
|
||||
|
||||
for (var i = 0; i <= Cura.ProfilesModel.rowCount(); i++) {
|
||||
for (var i = 0; i < Cura.ProfilesModel.rowCount(); i++) {
|
||||
var qualityItem = Cura.ProfilesModel.getItem(i)
|
||||
|
||||
// Add each quality item to the UI quality model
|
||||
qualityModel.append(qualityItem)
|
||||
|
||||
// Set selected value
|
||||
if (Cura.MachineManager.activeQualityId == qualityItem.id) {
|
||||
if (Cura.MachineManager.activeQualityType == qualityItem.metadata.quality_type) {
|
||||
qualityModel.activeQualityIndex = i
|
||||
}
|
||||
|
||||
@ -143,14 +143,7 @@ Item
|
||||
qualityModel.availableTotalTicks = -1
|
||||
|
||||
// check, the ticks count cannot be less than zero
|
||||
if(Cura.ProfilesModel.rowCount() != 0)
|
||||
{
|
||||
qualityModel.totalTicks = Cura.ProfilesModel.rowCount() - 1 // minus one, because slider starts from 0
|
||||
}
|
||||
else
|
||||
{
|
||||
qualityModel.totalTicks = 0
|
||||
}
|
||||
qualityModel.totalTicks = Math.max(0, Cura.ProfilesModel.rowCount() - 1)
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,7 +284,7 @@ Item
|
||||
implicitWidth: 10 * screenScaleFactor
|
||||
implicitHeight: implicitWidth
|
||||
radius: implicitWidth / 2
|
||||
visible: !Cura.SimpleModeSettingsManager.isProfileCustomized;
|
||||
visible: !Cura.SimpleModeSettingsManager.isProfileCustomized && !Cura.SimpleModeSettingsManager.isProfileUserCreated
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -366,7 +359,7 @@ Item
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
var content = catalog.i18nc("@tooltip","You have selected a custom profile. If you want to change it, go to custom mode.")
|
||||
var content = catalog.i18nc("@tooltip","You have modified some profile settings. If you want to change these go to custom mode.")
|
||||
base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, customisedSettings.height), content)
|
||||
}
|
||||
onExited: base.hideTooltip()
|
||||
|
Loading…
x
Reference in New Issue
Block a user