Add 'Reload from directory' option for batch reloading parts #1407

Open
opened 2026-04-05 17:36:53 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @NoahTingey on 12/7/2025

Description

What does this PR address?
This PR addresses #10657: "Add the ability to use relative filepaths when clicking 'reload from disk'"

Users who work with template-based workflows (e.g., duplicating a folder containing CAD files, STLs, and 3MF projects) currently cannot easily reload all parts from disk because the 3MF stores absolute file paths. When the folder is duplicated or moved, the "Reload from disk" option points to the original location, requiring manual replacement of each part individually.

What new features does this PR introduce?
Adds a new right-click menu option: "Reload from directory..."
This option allows users to:

  1. Select multiple objects/parts (or an assembly containing multiple parts)
  2. Choose a directory via a folder picker dialog
  3. Automatically reload all selected parts by matching their original source filenames within the chosen directory

This is particularly useful for:

  • Template-based workflows where folders are duplicated
  • Projects that have been moved to a different location
  • Batch updating multiple STL files that share a common directory

The menu option appears in:

  • Object context menu (when multiple parts are selected)
  • Part context menu
  • Multi-selection context menu

Note: The option is only enabled when 2 or more reloadable volumes are selected, as it's designed for batch operations rather than single-file reloads (where "Reload from disk" already serves this purpose).

Any breaking changes or dependencies?
No. This does not modify existing behavior. The existing "Reload from disk" functionality remains unchanged.

Screenshots/Recordings/Graphs

See here:
https://github.com/user-attachments/assets/96e5a966-f220-4721-92c7-50440a822b74

Tests

Test 1: Selecting a single assembly with multiple parts

  • Opened a 3MF containing an object that was an assembly of multiple parts
  • Selected it, right clicked, "Reload from directory..." appeared. Clicked it
  • Selected a directory containing the updated STL file for each part in the assembled object. The filenames of the updated STLs were the same as the filenames of the STLs to be replaced
  • All parts successfully reloaded from the new directory and the assembly structure & print settings were preserved

Test 2: Multiple separate objects selected

  • Imported 2 separate STL files as individual objects
  • Selected both objects (tried this both in the 3D view and in the list view in the "Objects" tab)
  • Again, selected a directory containing the updated STL file for both parts
  • Both parts successfully reloaded from the new directory, preserving their print settings

Test 3: Separate objects + assemblies at the same time

  • Opened a 3MF containing an object that was an assembly of multiple parts, as well as some individual (non-assembled) parts
  • Selected all of them
  • Again, selected a directory containing updated STLs for all the parts (both those that comprise the assembled object and the individual parts)
  • All parts successfully reloaded from the new directory and the assembly structure & print settings were preserved

Test 4: Single part

  • Selected a single STL file on a build plate
  • Right clicked, "Reload from directory..." appeared but was greyed out (as intended)

Test 5: Files missing

  • Same procedure as Test 2, but one of the part's updated file was missing in the new directory
  • Onscreen warning appeared, asking whether I'd like to proceed (only updating the part that had a match, leaving the other part alone) or if I'd like to cancel the operation
  • Tried both options. Both options worked as expected.

Test 6: Existing functionality preserved

  • Verified that "Reload from disk" still works as it did before
*Originally created by @NoahTingey on 12/7/2025* # Description **What does this PR address?** This PR addresses #10657: "Add the ability to use relative filepaths when clicking 'reload from disk'" Users who work with template-based workflows (e.g., duplicating a folder containing CAD files, STLs, and 3MF projects) currently cannot easily reload all parts from disk because the 3MF stores absolute file paths. When the folder is duplicated or moved, the "Reload from disk" option points to the original location, requiring manual replacement of each part individually. **What new features does this PR introduce?** Adds a new right-click menu option: "Reload from directory..." This option allows users to: 1. Select multiple objects/parts (or an assembly containing multiple parts) 2. Choose a directory via a folder picker dialog 3. Automatically reload all selected parts by matching their original source filenames within the chosen directory This is particularly useful for: - Template-based workflows where folders are duplicated - Projects that have been moved to a different location - Batch updating multiple STL files that share a common directory The menu option appears in: - Object context menu (when multiple parts are selected) - Part context menu - Multi-selection context menu Note: The option is only enabled when 2 or more reloadable volumes are selected, as it's designed for batch operations rather than single-file reloads (where "Reload from disk" already serves this purpose). **Any breaking changes or dependencies?** No. This does not modify existing behavior. The existing "Reload from disk" functionality remains unchanged. # Screenshots/Recordings/Graphs See here: https://github.com/user-attachments/assets/96e5a966-f220-4721-92c7-50440a822b74 ## Tests Test 1: Selecting a single assembly with multiple parts - Opened a 3MF containing an object that was an assembly of multiple parts - Selected it, right clicked, "Reload from directory..." appeared. Clicked it - Selected a directory containing the updated STL file for each part in the assembled object. The filenames of the updated STLs were the same as the filenames of the STLs to be replaced - All parts successfully reloaded from the new directory and the assembly structure & print settings were preserved Test 2: Multiple separate objects selected - Imported 2 separate STL files as individual objects - Selected both objects (tried this both in the 3D view and in the list view in the "Objects" tab) - Again, selected a directory containing the updated STL file for both parts - Both parts successfully reloaded from the new directory, preserving their print settings Test 3: Separate objects + assemblies at the same time - Opened a 3MF containing an object that was an assembly of multiple parts, as well as some individual (non-assembled) parts - Selected all of them - Again, selected a directory containing updated STLs for all the parts (both those that comprise the assembled object and the individual parts) - All parts successfully reloaded from the new directory and the assembly structure & print settings were preserved Test 4: Single part - Selected a single STL file on a build plate - Right clicked, "Reload from directory..." appeared but was greyed out (as intended) Test 5: Files missing - Same procedure as Test 2, but one of the part's updated file was missing in the new directory - Onscreen warning appeared, asking whether I'd like to proceed (only updating the part that had a match, leaving the other part alone) or if I'd like to cancel the operation - Tried both options. Both options worked as expected. Test 6: Existing functionality preserved - Verified that "Reload from disk" still works as it did before
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#1407