supermerill / SuperSlicer

G-code generator for 3D printers (Prusa, Voron, Creality, etc.)
4.04k stars 515 forks source link

Reload filaments when the files are changed. #4188

Open bofh69 opened 3 months ago

bofh69 commented 3 months ago

Is your feature request related to a problem? Please describe.

I've written a script that creates/updates/delete filament configuration files from the spools/filament data in Spoolman.

When I now add a new filament (or change an existing) in Spoolman, the new filament can't be seen in SuperSlicer until I restart it. I assume people sharing their config files between computers with dropbox, onedrive, shared drive etc have the same problem when they modify a filament file on one computer and don't restart SuperSlicer on another.

Describe the solution you'd like

It would be nice if unchanged filaments in the GUI reflected the filaments on disk by SuperSlicer automatically reloading the configuration when they change.

For changed filaments, it would be extra nice if the fields that now differ between the in memory version and the file are marked as usual, pressing the revert icon causes them to use the value from the updated file. I guess that would be a lot of work though. A less complicated solution could be to just show a button next to the filament that will reload it from disk, discarding local changes.

Describe how it would work The best solution would be if SuperSlicer monitors/polls the files & dir and (re)loads them when they are changed/created and removes filaments when they are removed from disk (or changes them to be new, unsaved filaments).

The second best option would be if SuperSlicer could have a menu entry to reload all filaments.

Just loading new filaments would go a long way though.

Describe alternatives you've considered

Just restarting the program. It is a bit annoying though. I rarely slice the same things twice so I usually don't create projects. I may have done some config changes that I don't want to save which also makes it more of a hassle to restart SuperSlicer.