mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-24 05:29:12 +08:00
Merge remote-tracking branch 'origin/main' into PP-19_also_increase_jerk_for_support
This commit is contained in:
commit
ddb67fef6d
@ -257,6 +257,7 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
from UM.CentralFileStorage import CentralFileStorage
|
from UM.CentralFileStorage import CentralFileStorage
|
||||||
CentralFileStorage.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
|
CentralFileStorage.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
|
||||||
|
Resources.setIsEnterprise(ApplicationMetadata.IsEnterpriseVersion)
|
||||||
|
|
||||||
@pyqtProperty(str, constant=True)
|
@pyqtProperty(str, constant=True)
|
||||||
def ultimakerCloudApiRootUrl(self) -> str:
|
def ultimakerCloudApiRootUrl(self) -> str:
|
||||||
@ -315,7 +316,7 @@ class CuraApplication(QtApplication):
|
|||||||
def initialize(self) -> None:
|
def initialize(self) -> None:
|
||||||
self.__addExpectedResourceDirsAndSearchPaths() # Must be added before init of super
|
self.__addExpectedResourceDirsAndSearchPaths() # Must be added before init of super
|
||||||
|
|
||||||
super().initialize()
|
super().initialize(ApplicationMetadata.IsEnterpriseVersion)
|
||||||
|
|
||||||
self._preferences.addPreference("cura/single_instance", False)
|
self._preferences.addPreference("cura/single_instance", False)
|
||||||
self._use_single_instance = self._preferences.getValue("cura/single_instance") or self._cli_args.single_instance
|
self._use_single_instance = self._preferences.getValue("cura/single_instance") or self._cli_args.single_instance
|
||||||
@ -348,12 +349,12 @@ class CuraApplication(QtApplication):
|
|||||||
Resources.addExpectedDirNameInData(dir_name)
|
Resources.addExpectedDirNameInData(dir_name)
|
||||||
|
|
||||||
app_root = os.path.abspath(os.path.join(os.path.dirname(sys.executable)))
|
app_root = os.path.abspath(os.path.join(os.path.dirname(sys.executable)))
|
||||||
Resources.addSearchPath(os.path.join(app_root, "share", "cura", "resources"))
|
Resources.addSecureSearchPath(os.path.join(app_root, "share", "cura", "resources"))
|
||||||
|
|
||||||
Resources.addSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources"))
|
Resources.addSecureSearchPath(os.path.join(self._app_install_dir, "share", "cura", "resources"))
|
||||||
if not hasattr(sys, "frozen"):
|
if not hasattr(sys, "frozen"):
|
||||||
resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")
|
resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")
|
||||||
Resources.addSearchPath(resource_path)
|
Resources.addSecureSearchPath(resource_path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _initializeSettingDefinitions(cls):
|
def _initializeSettingDefinitions(cls):
|
||||||
@ -942,6 +943,7 @@ class CuraApplication(QtApplication):
|
|||||||
self._qml_import_paths.append(Resources.getPath(self.ResourceTypes.QmlFiles))
|
self._qml_import_paths.append(Resources.getPath(self.ResourceTypes.QmlFiles))
|
||||||
self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing engine..."))
|
self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing engine..."))
|
||||||
self.initializeEngine()
|
self.initializeEngine()
|
||||||
|
self.getTheme().setCheckIfTrusted(ApplicationMetadata.IsEnterpriseVersion)
|
||||||
|
|
||||||
# Initialize UI state
|
# Initialize UI state
|
||||||
controller.setActiveStage("PrepareStage")
|
controller.setActiveStage("PrepareStage")
|
||||||
|
@ -60,7 +60,7 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
executable_name = "CuraEngine"
|
executable_name = "CuraEngine"
|
||||||
if Platform.isWindows():
|
if Platform.isWindows():
|
||||||
executable_name += ".exe"
|
executable_name += ".exe"
|
||||||
default_engine_location = executable_name
|
self._default_engine_location = executable_name
|
||||||
|
|
||||||
search_path = [
|
search_path = [
|
||||||
os.path.abspath(os.path.dirname(sys.executable)),
|
os.path.abspath(os.path.dirname(sys.executable)),
|
||||||
@ -74,29 +74,29 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
for path in search_path:
|
for path in search_path:
|
||||||
engine_path = os.path.join(path, executable_name)
|
engine_path = os.path.join(path, executable_name)
|
||||||
if os.path.isfile(engine_path):
|
if os.path.isfile(engine_path):
|
||||||
default_engine_location = engine_path
|
self._default_engine_location = engine_path
|
||||||
break
|
break
|
||||||
|
|
||||||
if Platform.isLinux() and not default_engine_location:
|
if Platform.isLinux() and not self._default_engine_location:
|
||||||
if not os.getenv("PATH"):
|
if not os.getenv("PATH"):
|
||||||
raise OSError("There is something wrong with your Linux installation.")
|
raise OSError("There is something wrong with your Linux installation.")
|
||||||
for pathdir in cast(str, os.getenv("PATH")).split(os.pathsep):
|
for pathdir in cast(str, os.getenv("PATH")).split(os.pathsep):
|
||||||
execpath = os.path.join(pathdir, executable_name)
|
execpath = os.path.join(pathdir, executable_name)
|
||||||
if os.path.exists(execpath):
|
if os.path.exists(execpath):
|
||||||
default_engine_location = execpath
|
self._default_engine_location = execpath
|
||||||
break
|
break
|
||||||
|
|
||||||
application = CuraApplication.getInstance() #type: CuraApplication
|
application = CuraApplication.getInstance() #type: CuraApplication
|
||||||
self._multi_build_plate_model = None #type: Optional[MultiBuildPlateModel]
|
self._multi_build_plate_model = None #type: Optional[MultiBuildPlateModel]
|
||||||
self._machine_error_checker = None #type: Optional[MachineErrorChecker]
|
self._machine_error_checker = None #type: Optional[MachineErrorChecker]
|
||||||
|
|
||||||
if not default_engine_location:
|
if not self._default_engine_location:
|
||||||
raise EnvironmentError("Could not find CuraEngine")
|
raise EnvironmentError("Could not find CuraEngine")
|
||||||
|
|
||||||
Logger.log("i", "Found CuraEngine at: %s", default_engine_location)
|
Logger.log("i", "Found CuraEngine at: %s", self._default_engine_location)
|
||||||
|
|
||||||
default_engine_location = os.path.abspath(default_engine_location)
|
self._default_engine_location = os.path.abspath(self._default_engine_location)
|
||||||
application.getPreferences().addPreference("backend/location", default_engine_location)
|
application.getPreferences().addPreference("backend/location", self._default_engine_location)
|
||||||
|
|
||||||
# Workaround to disable layer view processing if layer view is not active.
|
# Workaround to disable layer view processing if layer view is not active.
|
||||||
self._layer_view_active = False #type: bool
|
self._layer_view_active = False #type: bool
|
||||||
@ -215,7 +215,12 @@ class CuraEngineBackend(QObject, Backend):
|
|||||||
This is useful for debugging and used to actually start the engine.
|
This is useful for debugging and used to actually start the engine.
|
||||||
:return: list of commands and args / parameters.
|
:return: list of commands and args / parameters.
|
||||||
"""
|
"""
|
||||||
command = [CuraApplication.getInstance().getPreferences().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), ""]
|
from cura import ApplicationMetadata
|
||||||
|
if ApplicationMetadata.IsEnterpriseVersion:
|
||||||
|
command = [self._default_engine_location]
|
||||||
|
else:
|
||||||
|
command = [CuraApplication.getInstance().getPreferences().getValue("backend/location")]
|
||||||
|
command += ["connect", "127.0.0.1:{0}".format(self._port), ""]
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(prog = "cura", add_help = False)
|
parser = argparse.ArgumentParser(prog = "cura", add_help = False)
|
||||||
parser.add_argument("--debug", action = "store_true", default = False, help = "Turn on the debug mode by setting this option.")
|
parser.add_argument("--debug", action = "store_true", default = False, help = "Turn on the debug mode by setting this option.")
|
||||||
|
@ -122,6 +122,7 @@ Rectangle
|
|||||||
}
|
}
|
||||||
visible: !isNetworkConfigured && isNetworkConfigurable
|
visible: !isNetworkConfigured && isNetworkConfigurable
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
|
height: childrenRect.height
|
||||||
|
|
||||||
UM.ColorImage
|
UM.ColorImage
|
||||||
{
|
{
|
||||||
|
@ -75,6 +75,7 @@ Ultimaker Cura 5.0 is now compatible with Apple M1.
|
|||||||
- Fixed a bug where travels would go through the model with printing PVA
|
- Fixed a bug where travels would go through the model with printing PVA
|
||||||
- Fixed a bug where Concentric ironing was affecting the print quality
|
- Fixed a bug where Concentric ironing was affecting the print quality
|
||||||
- Fixed a bug where there were missing infill layers
|
- Fixed a bug where there were missing infill layers
|
||||||
|
- Fixed AppRun permissions, contributed by probonopd
|
||||||
|
|
||||||
* Printer definitions, profiles and materials:
|
* Printer definitions, profiles and materials:
|
||||||
- Added Atom 3 and Atom 3 Lite printer definitions, contributed by Daniel-Kurth
|
- Added Atom 3 and Atom 3 Lite printer definitions, contributed by Daniel-Kurth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user