Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Load the autosaved config.ini through --load or a new --loadlast command #837

Closed
thantik opened this Issue Dec 1, 2012 · 7 comments

Comments

Projects
None yet
3 participants

thantik commented Dec 1, 2012

I'm currently trying to make my hackerspaces computer so that it's friendly to new users. Right now in order to accomplish this, I'm using a bash script, and setting the HOME variable to /home/%3dprintername%/

This works beautifully, and I'm able to set pronterface up with its own per-machine config, and since pronterface launches slic3r it also retains the HOME variable set, which allows different Slic3r configs to be separated as well. Similar abilities exist in windows and mac.

The problem that arises is that these users don't exactly know what configs are stored where (due to the handful of people that use the machine), and while I could do a --load %someexportedconfig% and instruct them to re-export the config every time they change a setting, there's a chance of them overwriting them, etc. There's also the slightly-inconvenient aspect of constantly having to re-export a config every time. I'm requesting a command-line option that I can pass, to load the stored config.ini that slic3r saves each time it is exited.

What this will allow me and others to do: --loadlast or --load ~/.Slic3r/config.ini (slic3r currently doesn't handle the format that the auto-saved config.ini is in) and load the settings that were last used in the GUI slic3r window.

What it will accomplish: It will allow users who use the slic3r GUI through pronterface to utilize a friendly method in which they change settings. They can rapidly select through the plater dropdown, which options they want, close the window, and load a file through pronterface to have it sliced with those last-chosen options. I'll be posting a nice how-to on how this is accomplished as well so that others can reproduce this.

The only thing this should take to implement is seeing if the --load command is reading the autosaved config.ini, and then traversing the folders lower (which are basically an exported config, just split into sections) and loading those. Optionally, though would be appreciated, a --loadlast could just search for the default autosaved config.ini and use it.

Owner

alexrj commented Dec 1, 2012

If you launch Slic3r it will automatically load the last presets. Why would we need a --loadlast option?

thantik commented Dec 1, 2012

The command line version doesn't seem to exhibit this functionality you speak of. Pronterface runs the command line version in order to do its slice operation. Whenever pronterface runs slic3r.pl without a --load then slic3r.pl defaults to "-default-" from my tests (git version as of last night)

Is there already functionality built in to load whatever the last selection was in the GUI from the command line?

thantik commented Dec 2, 2012

Is it possible to do something like slic3r.pl --gui --load /lastconfig.ini --save /lastconfig.ini to get this behavior perhaps? So that when closing the window for selected settings, I get a "properly" exported ini file that I can load? I basically just need a way to allow users to not have to deal with, or even worry about having to export a file themselves.

--edit-- apparently doing slic3r.pl --gui with --save just immediately exits, so that doesn't work either. Even if --load could just work on the ~/.Slic3r/config.ini that would be perfect. config.ini lists all the currently gui-selected config files, so as long as --load could chain --load whatever was listed in that saved config.ini (the one that the GUI saves) that would be perfect.

I could always load the separated .ini files myself from the 3 folders, but that defeats the whole purpose of being able to select different dropdowns, etc and would basically restrict me to those 3 presets.

jothan added a commit to jothan/Slic3r that referenced this issue Feb 9, 2013

Export the last selected GUI configuration automatically.
Avoids the annoying save, accept, export, accept pattern. Now you just
need to save. This is the first half of fixing issue #837. I have no
idea how to do a --loadlast option since the data directory path is
initialized in the GUI code and references WX code.

You may then do slic3r.pl --load ~/.Slic3r/last_config.ini
whatever.stl to slice with your last configuration.

More of a suggestion than a final patch.

jothan commented Feb 27, 2013

@alexrj When you slice using the command line, Slic3r seems to use default values rather than loading the last presets.

Owner

alexrj commented Feb 27, 2013

Jothan, yes I know: I designed it that way. :-)

I'm thinking about better ways to integrate Slic3r with host software.

Owner

alexrj commented Jun 2, 2013

Okay, I implemented a new --autosave option that accepts a file path and automatically exports the full config to it whenever an option is changed in the GUI. This allows flexible toolchain integration because one can launch Slic3r like this:

./slic3r.pl --autosave ~/my_config.ini

and then just load it when slicing from command line:

./slic3r.pl --load ~/my_config.ini foo.stl

The specified file will be sliced using the last selected options in the GUI.

@alexrj alexrj closed this Jun 2, 2013

jothan commented Jul 25, 2013

Thanks, this is exactly what I needed !

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