mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:39:03 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
8e12d49160
@ -1863,6 +1863,7 @@ class CuraApplication(QtApplication):
|
|||||||
else:
|
else:
|
||||||
node = CuraSceneNode()
|
node = CuraSceneNode()
|
||||||
node.setMeshData(original_node.getMeshData())
|
node.setMeshData(original_node.getMeshData())
|
||||||
|
node.source_mime_type = original_node.source_mime_type
|
||||||
|
|
||||||
# Setting meshdata does not apply scaling.
|
# Setting meshdata does not apply scaling.
|
||||||
if original_node.getScale() != Vector(1.0, 1.0, 1.0):
|
if original_node.getScale() != Vector(1.0, 1.0, 1.0):
|
||||||
|
@ -113,7 +113,9 @@ class AuthorizationService:
|
|||||||
# The token could not be refreshed using the refresh token. We should login again.
|
# The token could not be refreshed using the refresh token. We should login again.
|
||||||
return None
|
return None
|
||||||
# Ensure it gets stored as otherwise we only have it in memory. The stored refresh token has been deleted
|
# Ensure it gets stored as otherwise we only have it in memory. The stored refresh token has been deleted
|
||||||
# from the server already.
|
# from the server already. Do not store the auth_data if we could not get new auth_data (eg due to a
|
||||||
|
# network error), since this would cause an infinite loop trying to get new auth-data
|
||||||
|
if self._auth_data.success:
|
||||||
self._storeAuthData(self._auth_data)
|
self._storeAuthData(self._auth_data)
|
||||||
return self._auth_helpers.parseJWT(self._auth_data.access_token)
|
return self._auth_helpers.parseJWT(self._auth_data.access_token)
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ class CuraSceneNode(SceneNode):
|
|||||||
copy.setTransformation(self.getLocalTransformation(copy= False))
|
copy.setTransformation(self.getLocalTransformation(copy= False))
|
||||||
copy.setMeshData(self._mesh_data)
|
copy.setMeshData(self._mesh_data)
|
||||||
copy.setVisible(cast(bool, deepcopy(self._visible, memo)))
|
copy.setVisible(cast(bool, deepcopy(self._visible, memo)))
|
||||||
|
copy.source_mime_type = cast(str, deepcopy(self.source_mime_type, memo))
|
||||||
copy._selectable = cast(bool, deepcopy(self._selectable, memo))
|
copy._selectable = cast(bool, deepcopy(self._selectable, memo))
|
||||||
copy._name = cast(str, deepcopy(self._name, memo))
|
copy._name = cast(str, deepcopy(self._name, memo))
|
||||||
for decorator in self._decorators:
|
for decorator in self._decorators:
|
||||||
|
@ -385,6 +385,11 @@ class DigitalFactoryController(QObject):
|
|||||||
def _applicationInitializationFinished(self) -> None:
|
def _applicationInitializationFinished(self) -> None:
|
||||||
self._supported_file_types = self._application.getInstance().getMeshFileHandler().getSupportedFileTypesRead()
|
self._supported_file_types = self._application.getInstance().getMeshFileHandler().getSupportedFileTypesRead()
|
||||||
|
|
||||||
|
# Although Cura supports these, it's super confusing in this context to show them.
|
||||||
|
for extension in ["jpg", "jpeg", "png", "bmp", "gif"]:
|
||||||
|
if extension in self._supported_file_types:
|
||||||
|
del self._supported_file_types[extension]
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def openSelectedFiles(self) -> None:
|
def openSelectedFiles(self) -> None:
|
||||||
""" Downloads, then opens all files selected in the Qt frontend open dialog.
|
""" Downloads, then opens all files selected in the Qt frontend open dialog.
|
||||||
|
@ -72,6 +72,15 @@ class FilamentChange(Script):
|
|||||||
"type": "float",
|
"type": "float",
|
||||||
"default_value": 0,
|
"default_value": 0,
|
||||||
"enabled": "not firmware_config"
|
"enabled": "not firmware_config"
|
||||||
|
},
|
||||||
|
"z_position":
|
||||||
|
{
|
||||||
|
"label": "Z Position (relative)",
|
||||||
|
"description": "Extruder relative Z position. Move the print head up for filament change.",
|
||||||
|
"unit": "mm",
|
||||||
|
"type": "float",
|
||||||
|
"default_value": 0,
|
||||||
|
"minimum_value": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}"""
|
}"""
|
||||||
@ -87,6 +96,7 @@ class FilamentChange(Script):
|
|||||||
later_retract = self.getSettingValueByKey("later_retract")
|
later_retract = self.getSettingValueByKey("later_retract")
|
||||||
x_pos = self.getSettingValueByKey("x_position")
|
x_pos = self.getSettingValueByKey("x_position")
|
||||||
y_pos = self.getSettingValueByKey("y_position")
|
y_pos = self.getSettingValueByKey("y_position")
|
||||||
|
z_pos = self.getSettingValueByKey("z_position")
|
||||||
firmware_config = self.getSettingValueByKey("firmware_config")
|
firmware_config = self.getSettingValueByKey("firmware_config")
|
||||||
|
|
||||||
color_change = "M600"
|
color_change = "M600"
|
||||||
@ -104,6 +114,9 @@ class FilamentChange(Script):
|
|||||||
if y_pos is not None:
|
if y_pos is not None:
|
||||||
color_change = color_change + (" Y%.2f" % y_pos)
|
color_change = color_change + (" Y%.2f" % y_pos)
|
||||||
|
|
||||||
|
if z_pos is not None and z_pos > 0.:
|
||||||
|
color_change = color_change + (" Z%.2f" % z_pos)
|
||||||
|
|
||||||
color_change = color_change + " ; Generated by FilamentChange plugin\n"
|
color_change = color_change + " ; Generated by FilamentChange plugin\n"
|
||||||
|
|
||||||
layer_targets = layer_nums.split(",")
|
layer_targets = layer_nums.split(",")
|
||||||
|
@ -229,6 +229,11 @@ class SliceInfo(QObject, Extension):
|
|||||||
|
|
||||||
model["model_settings"] = model_settings
|
model["model_settings"] = model_settings
|
||||||
|
|
||||||
|
if node.source_mime_type is None:
|
||||||
|
model["mime_type"] = ""
|
||||||
|
else:
|
||||||
|
model["mime_type"] = node.source_mime_type.name
|
||||||
|
|
||||||
data["models"].append(model)
|
data["models"].append(model)
|
||||||
|
|
||||||
print_times = print_information.printTimes()
|
print_times = print_information.printTimes()
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
<li><b>Bounding Box:</b> [minimum x, y, z; maximum x, y, z]</li>
|
<li><b>Bounding Box:</b> [minimum x, y, z; maximum x, y, z]</li>
|
||||||
<li><b>Is Helper Mesh:</b> no</li>
|
<li><b>Is Helper Mesh:</b> no</li>
|
||||||
<li><b>Helper Mesh Type:</b> support mesh</li>
|
<li><b>Helper Mesh Type:</b> support mesh</li>
|
||||||
|
<li><b>File type:</b> STL</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user