-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Reload from disk" - UI function overhaul #4388
Conversation
…ating between the original file and later added parts and modifiers pointing to other files
Looks good+clean from a source perspective; I will build and take a look at the UI before merging. |
Disable auto-center parts (x,y). Load 20mmbox.stl, and then add 20mmbox_2z.stl. You'll see it goes off into the corner (may be a bug, idk). Move it back. Click OK and try to reload. The modifier mesh gets kicked off into the ether again. :( |
Also, a "do this all the time and don't bother me again" checkbox would be a good idea (with the ability to set/unset it from File->Preferences), I think. |
…d default option in preferences, copied volumes are matched the new object's origin translation
just tested and seems to work as expected I think it's a good compromise that should make everyone happy :) |
Related issue: #4374
Description
The function now tries to reload all referenced files (original object and added parts and modifiers) and asks the user how to proceed.
In the issue some opinions were given, that the function should discard all manual configurations (as 3mf files already contain them), and some that it should keep them (working with multiple exported STLs).
Additionally, warnings are thrown, if the reload doesn't work (original file deleted, object cut/ split) or added parts/ modifiers loose their reference to the path (modifier file deleted, less volumes in file -> the mesh is copied in that case).
Changes breakdown by file
Plater.pm
function load_file: pass the correct object index
set variables in the volumes to determine their origin
function reload_from_disk: see description
ObjectPartsPanel.pm
set variables in the volumes to determine their origin (parts/ modifiers)
Model.xsp/.hpp/.cpp
adding needed variables to ModelVolume
Testing
Testing turned out to be tedious, as the names had to be changed repeatedly, but I think I covered all relevant cases (major mesh change, different number of volumes, application of configurations)
The attached files were used.
Multidomain_test_files.zip