-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Is there an existing issue for this feature request?
- I have searched the existing issues
Is your feature request related to a problem?
(Note: I have searched keywords related to 'load', 'open', 'printer profile', but couldn't find any existing open enhancements)
.3mf files downloaded from makerworld usually contain the printer profile, filament profile and speed profile they've been created with. When you have a different printer, you have to manually switch off this forced upon new printer and settings. I would prefer to be able to choose if i want to load the settings associated with a .3mf file.
I can't find a feature in the preferences to disable this behaviour. If this feature already exists but under a different menu, it may be a good idea to put this feature in a more sensible menu for it.
Which printers will be beneficial to this feature?
All
Describe the solution you'd like
I think in the preferences screen, a good addition would be an option to change this behaviour. Possibly have the label 'Loading behaviour project (.3mf) printer settings'. I think this option would be best suited to be a dropdown with 3 options. 'Always apply', 'Always ask', 'Never apply'.
Always apply should replicate the current behaviour. If you load a .3mf file with a printer profile included, it should load this printer profile, and replace your currently selected printer profile with the loaded one. This should be the default option.
Always ask should bring up a popup box that asks the user if they want to load the printer profile. If 'Yes' is pressed, the same behavour as 'Always apply' should be applied. If 'No' is pressed, the same behavour as 'Never apply' should be applied. This option should possibly also show the changes in the profile, so the user is more informed what they're missing out on when pressing 'No'.
Never apply should not load the printer profile from the .3mf, keeping the current printer profile.
Describe alternatives you've considered
Currently, i use an external python script to modify the .3mf before loading it into orca. This solution isn't ideal as it requires an extra step before loading into orca. If you do accidentally load the file, your settings will be changed without asking. Also, open slicer integrations from websites (thingiverse, printables, makerworld) leave no room for an external script to run.
For those interested, this is the python script i use. I haven't double checked if slice_info.config needs to be removed.
import sys, os, zipfile, time
def remove_from_zip(path : str, remove_list : list[str]):
temp_path = os.path.join(os.path.dirname(path), str(time.time()))
with zipfile.ZipFile(path, 'r') as zin:
with zipfile.ZipFile(temp_path, 'w') as zout:
zout.comment = zin.comment
for item in zin.infolist():
print(item.filename)
if item.filename not in remove_list:
zout.writestr(item, zin.read(item.filename))
os.remove(path)
os.rename(temp_path, path)
if __name__ == "__main__":
if len(sys.argv) <= 1:
print(f"Usage: python3 {sys.argv[0]} path/to/3mf")
exit(1)
if not os.path.isfile(sys.argv[1]):
print("File does not exist")
exit(1)
remove_from_zip(sys.argv[1], ["Metadata/project_settings.config", "Metadata/slice_info.config"])
Additional context
No response