From 62aff0be12396b934c0ca74b6f712d814c90cac4 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Wed, 21 Feb 2024 11:40:51 +0100 Subject: [PATCH] Determine `ucp` based on included file CURA-11403 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 04885a961b..25e2afa8bd 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -58,6 +58,7 @@ _ignored_machine_network_metadata: Set[str] = { "is_abstract_machine" } +USER_SETTINGS_PATH = "Cura/user-settings.json" class ContainerInfo: def __init__(self, file_name: Optional[str], serialized: Optional[str], parser: Optional[ConfigParser]) -> None: @@ -235,9 +236,8 @@ class ThreeMFWorkspaceReader(WorkspaceReader): containers_found_dict = {k: False for k in resolve_strategy_keys} # Check whether the file is a UCP, which changes some import options - #FIXME Instead of this, we should just check for the presence of the user-settings file, whatever the extension - if file_name.endswith('.3mf'): - is_ucp = True + is_ucp = USER_SETTINGS_PATH in cura_file_names + # # Read definition containers #