Skip to content

FIX: Reload from disk fails when 3MF stores source as filename only - #11988

Open
ClusterM wants to merge 1 commit into
bambulab:masterfrom
ClusterM:fix_model_reload
Open

FIX: Reload from disk fails when 3MF stores source as filename only#11988
ClusterM wants to merge 1 commit into
bambulab:masterfrom
ClusterM:fix_model_reload

Conversation

@ClusterM

@ClusterM ClusterM commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reload from disk often showed Unable to reload for models imported from a 3MF (for example a FreeCAD export), even when the file on disk loaded fine.
  • 3MF projects store source.input_file as a filename only (tpu_tube-Roller.3mf) by design (FullPathSources is off so shared projects do not leak full paths). After the same file is read again, the new volume gets the absolute path. The matcher used == on those strings, so a valid reload was rejected.
  • The name fallback never ran in this case either: it required the part name to equal the source filename (Roller vs tpu_tube-Roller.3mf). The 3MF object name and the part name on the plate already matched (Roller).

Change

In Plater::priv::reload_from_disk():

  • Compare source files by filename (case-insensitive), not by the full stored string.
  • If the stored object/volume slot does not match, search the just-loaded model by part name. Do not require that name to be the source filename.

Signed-off-by: Alexey Cluster <cluster@cluster.wtf>

@Haidiye00 Haidiye00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, please provide the GIF tests before and after the modification. Thank you

@ClusterM

Copy link
Copy Markdown
Contributor Author

Hello, please provide the GIF tests before and after the modification. Thank you

Before the fix:

2026-08-28 15-41-57

After the fix:

2026-08-28 15-44-08

@Haidiye00 Haidiye00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants