Browse Source

Merge branch 'main' into mingda_printers

HellAholic 5 months ago
parent
commit
163d50fdfc

+ 1 - 1
.github/workflows/printer-linter-format.yml

@@ -16,7 +16,7 @@ jobs:
         runs-on: ubuntu-latest
         steps:
             -   name: Checkout
-                uses: actions/checkout@v3
+                uses: actions/checkout@v4
 
             -   uses: technote-space/get-diff-action@v6
                 with:

+ 2 - 2
.github/workflows/printer-linter-pr-diagnose.yml

@@ -15,7 +15,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           fetch-depth: 2
 
@@ -55,7 +55,7 @@ jobs:
           echo ${{ github.event.pull_request.head.repo.full_name }} > printer-linter-result/pr-head-repo.txt
           echo ${{ github.event.pull_request.head.sha }} > printer-linter-result/pr-head-sha.txt
 
-      - uses: actions/upload-artifact@v2
+      - uses: actions/upload-artifact@v4
         with:
           name: printer-linter-result
           path: printer-linter-result/

+ 7 - 0
.github/workflows/release-process_release-candidate.yml

@@ -9,6 +9,11 @@ on:
         required: true
         type: string
 
+      publish_release_description:
+        description: 'Create the GitHub release (if existing, the description will be overridden based on the changelog)'
+        required: true
+        type: boolean
+
 jobs:
   parse-version:
     name: Parse input version string
@@ -153,10 +158,12 @@ jobs:
           ref: ${{ needs.parse-version.outputs.branch_name }}
 
       - name: Extract changelog
+        if: ${{ inputs.publish_release_description }}
         run: python ./scripts/extract_changelog.py --version ${{ needs.parse-version.outputs.version_major }}.${{ needs.parse-version.outputs.version_minor }}.${{ needs.parse-version.outputs.version_patch }} --changelog ./resources/texts/change_log.txt > formatted_changelog.txt
 
       - name: Create release
         uses: notpeelz/action-gh-create-release@v5.0.1
+        if: ${{ inputs.publish_release_description }}
         with:
           target: ${{ needs.create-tags.outputs.main_commit }}
           tag: ${{ inputs.cura_version }}

+ 1 - 1
conandata.yml

@@ -10,7 +10,7 @@ requirements:
   - "pynest2d/5.3.0"
   - "native_cad_plugin/2.0.0"
 requirements_internal:
-  - "fdm_materials/(latest)@internal/testing"
+  - "fdm_materials/5.8.1"
   - "cura_private_data/(latest)@internal/testing"
 urls:
     default:

+ 1 - 0
cura/API/Account.py

@@ -232,6 +232,7 @@ class Account(QObject):
 
     def _onProfileChanged(self, profile: Optional[UserProfile]) -> None:
         self._user_profile = profile
+        self._updatePermissions()
         self.userProfileChanged.emit()
 
     def _sync(self) -> None:

+ 1 - 1
cura/CuraApplication.py

@@ -139,7 +139,7 @@ class CuraApplication(QtApplication):
     # SettingVersion represents the set of settings available in the machine/extruder definitions.
     # You need to make sure that this version number needs to be increased if there is any non-backwards-compatible
     # changes of the settings.
-    SettingVersion = 23
+    SettingVersion = 24
 
     Created = False
 

+ 1 - 0
cura/Machines/MachineNode.py

@@ -48,6 +48,7 @@ class MachineNode(ContainerNode):
         self.preferred_variant_name = my_metadata.get("preferred_variant_name", "")
         self.preferred_material = my_metadata.get("preferred_material", "")
         self.preferred_quality_type = my_metadata.get("preferred_quality_type", "")
+        self.supports_abstract_color = parseBool(my_metadata.get("supports_abstract_color", "false"))
 
         self._loadAll()
 

+ 3 - 4
cura/Machines/Models/QualityManagementModel.py

@@ -127,13 +127,12 @@ class QualityManagementModel(ListModel):
         # have no container for the global stack, because "my_profile" just got renamed to "my_new_profile". This results
         # in crashes because the rest of the system assumes that all data in a QualityChangesGroup will be correct.
         #
-        # Renaming the container for the global stack in the end seems to be ok, because the assumption is mostly based
-        # on the quality changes container for the global stack.
+        # This is why we use the "supress_signals" flag for the set name. This basically makes the change silent.
         for metadata in quality_changes_group.metadata_per_extruder.values():
             extruder_container = cast(InstanceContainer, container_registry.findContainers(id = metadata["id"])[0])
-            extruder_container.setName(new_name)
+            extruder_container.setName(new_name, supress_signals=True)
         global_container = cast(InstanceContainer, container_registry.findContainers(id = quality_changes_group.metadata_for_global["id"])[0])
-        global_container.setName(new_name)
+        global_container.setName(new_name, supress_signals=True)
 
         quality_changes_group.name = new_name
 

+ 4 - 0
cura/Machines/VariantNode.py

@@ -63,6 +63,8 @@ class VariantNode(ContainerNode):
         filtered_materials = [material for material in materials if not self.machine.isExcludedMaterialBaseFile(material["id"])]
 
         for material in filtered_materials:
+            if material.get("abstract_color", False) and not self.machine.supports_abstract_color:
+                continue  # do not show abstract color profiles if the machine does not support them
             base_file = material["base_file"]
             if base_file not in self.materials:
                 self.materials[base_file] = MaterialNode(material["id"], variant = self)
@@ -126,6 +128,8 @@ class VariantNode(ContainerNode):
             return  # We won't add any materials.
         material_definition = container.getMetaDataEntry("definition")
 
+        if (not self.machine.supports_abstract_color) and container.getMetaDataEntry("abstract_color", False):
+            return
         base_file = container.getMetaDataEntry("base_file")
         if self.machine.isExcludedMaterialBaseFile(base_file):
             return  # Material is forbidden for this printer.

+ 6 - 4
cura/PrinterOutput/FormatMaps.py

@@ -28,14 +28,15 @@ class FormatMaps:
 
     # A map from the material-name in their native file-formats to some info, including the internal name we use.
     MATERIAL_MAP = {
-        "abs": {"name": "ABS", "guid": "2780b345-577b-4a24-a2c5-12e6aad3e690"},
+        "abs": {"name": "ABS", "guid": "e0f1d581-cc6b-4e36-8f3c-3f5601ecba5f"},
          "abs-cf10": {"name": "ABS-CF", "guid": "495a0ce5-9daf-4a16-b7b2-06856d82394d"},
          "abs-wss1": {"name": "ABS-R", "guid": "88c8919c-6a09-471a-b7b6-e801263d862d"},
          "asa": {"name": "ASA", "guid": "f79bc612-21eb-482e-ad6c-87d75bdde066"},
          "nylon12-cf": {"name": "Nylon 12 CF", "guid": "3c6f2877-71cc-4760-84e6-4b89ab243e3b"},
-         "nylon": {"name": "Nylon", "guid": "283d439a-3490-4481-920c-c51d8cdecf9c"},
+         "nylon-cf": {"name": "Nylon CF", "guid": "17abb865-ca73-4ccd-aeda-38e294c9c60b"},
+         "nylon": {"name": "Nylon", "guid": "9475b03d-fd19-48a2-b7b5-be1fb46abb02"},
          "pc": {"name": "PC", "guid": "62414577-94d1-490d-b1e4-7ef3ec40db02"},
-         "petg": {"name": "PETG", "guid": "69386c85-5b6c-421a-bec5-aeb1fb33f060"},
+         "petg": {"name": "PETG", "guid": "2d004bbd-d1bb-47f8-beac-b066702d5273"},
          "pla": {"name": "PLA", "guid": "abb9c58e-1f56-48d1-bd8f-055fde3a5b56"},
          "pva": {"name": "PVA", "guid": "add51ef2-86eb-4c39-afd5-5586564f0715"},
          "wss1": {"name": "RapidRinse", "guid": "a140ef8f-4f26-4e73-abe0-cfc29d6d1024"},
@@ -44,7 +45,8 @@ class FormatMaps:
          "cpe": {"name": "CPE", "guid": "da1872c1-b991-4795-80ad-bdac0f131726"},
          "hips": {"name": "HIPS", "guid": "a468d86a-220c-47eb-99a5-bbb47e514eb0"},
          "tpu": {"name": "TPU 95A", "guid": "19baa6a9-94ff-478b-b4a1-8157b74358d2"},
-         "im-pla": {"name": "Tough", "guid": "de031137-a8ca-4a72-bd1b-17bb964033ad"}
+         "im-pla": {"name": "Tough", "guid": "96fca5d9-0371-4516-9e96-8e8182677f3c"}
+         # /!\ When changing this list, make sure the changes are reported accordingly on Digital Factory
     }
 
     __inverse_printer_name: Optional[Dict[str, str]] = None

Some files were not shown because too many files changed in this diff