Page 1 of 3
Autoload
Posted: Fri Jun 16, 2017 4:07 pm
by triplus
- Autoload.png (50.48 KiB) Viewed 5626 times
Autoload module for FreeCAD.
Provides ability to load more workbenches on FreeCAD start. Such ability can be useful for workbench customization purposes and in combination with modules such as PieMenu, ShortCuts, CommandPanel ...
Code repository:
https://github.com/triplus/Autoload
Re: Autoload
Posted: Fri Jun 16, 2017 4:28 pm
by microelly2
Good idea
can this startup loader be extended to do some more startup configuration?
I had the problem to add some pathes to my python environment
https://forum.freecadweb.org/viewtopic.php?f=22&t=21996
and it seems a good place to connect to these 3rd party modules too.
Re: Autoload
Posted: Fri Jun 16, 2017 7:21 pm
by sgrogan
This is indeed very interesting. One of my favourite FreeCAD features is the "lazy loading" But I have a startup macro that's cycles through a few workbenches so some commands/icons are immediately available at startup for global custom toolbars. Allowing the user to tune this behaviour seems convenient. I will definitely test this.
Re: Autoload
Posted: Fri Jun 16, 2017 9:50 pm
by triplus
I can investigate and try to add something like that. In a simple form.
P.S. Will first do some test and prototypes and lets see what will be the result.
Re: Autoload
Posted: Fri Jun 30, 2017 2:07 pm
by triplus
Features added:
- Autoload modules from macro folder
- Import can occur on two FreeCAD start stages
- Exception handling
Use case:
- New.png (37.96 KiB) Viewed 5421 times
Use the following convention:
- Prefix: Autoload_ (or Autoload_1_ to import module at latter FreeCAD start stage)
- Name: Any (ASCII)
- Suffix: .py
- Enable.png (55.77 KiB) Viewed 5421 times
Restart FreeCAD.
Re: Autoload
Posted: Fri Jun 30, 2017 4:28 pm
by chrisb
In Path Workbench was recently introduced a special folder for the post processors. Perhaps the same technique could be used here. Advantages: keep the macro directory tidyer, no need to rename.
Re: Autoload
Posted: Fri Jun 30, 2017 7:34 pm
by triplus
chrisb wrote: ↑Fri Jun 30, 2017 4:28 pm
In Path Workbench was recently introduced a special folder for the post processors. Perhaps the same technique could be used here. Advantages: keep the macro directory tidyer, no need to rename.
No as this feature was added for regular users. And they shouldn't need to care about things like that. And i tried to make sure the whole procedure can be done from the GUI with only a few clicks. If you are developer you have all other options available at your disposal.
P.S. Need to rename what?
Re: Autoload
Posted: Fri Jun 30, 2017 8:04 pm
by Kunda1
@triplus I submit a PR to tweek the README.md
https://github.com/triplus/Autoload/pull/2
Re: Autoload
Posted: Fri Jun 30, 2017 8:22 pm
by triplus
I'll take a look tomorrow.
P.S. By taking a quick look image and a bit of fine tuning the description makes sense. As for the rest i am not sure for now. I would likely rather see a link to FreeCAD wiki to be added (describing the procedure in detail). Instead of providing such verbose (install) information for each module.
Re: Autoload
Posted: Fri Jun 30, 2017 9:16 pm
by Kunda1
triplus wrote: ↑Fri Jun 30, 2017 8:22 pm
I'll take a look tomorrow.
P.S. By taking a quick look image and a bit of fine tuning the description makes sense. As for the rest i am not sure for now. I would likely rather see a link to FreeCAD wiki to be added (describing the procedure in detail). Instead of providing such verbose (install) information for each module.
Good point. It goes without saying that the motive behind it has several reasons
Uniformity between all FC addons,
Options for folks who'd rather not use the addon manager who have or don't have git.