Choose which workbeches load at start up [Feature Request]

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
M4x
Veteran
Posts: 1482
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Chose which workbeches load at start up [Feature Request]

Post by M4x »

Could someone explain to me why this might be useful please? The only reason I can think of would be to load draft WB if you're using draft tools in other workbenches for example. I think normally you've to load the draft WB before using those tools.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Chose which workbeches load at start up [Feature Request]

Post by kisolre »

M4x wrote: Thu Aug 05, 2021 1:54 pm Could someone explain
I have a toolbar with Part/Check geometry; Draft/Clone; Sketcher/Validate sketch; Part/Create shapes and primitives. I rarely use Part/Draft for anything else so opening them each time by hand was a hassle before Autoload.
User avatar
M4x
Veteran
Posts: 1482
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Chose which workbeches load at start up [Feature Request]

Post by M4x »

Okay, I.see I got it right but underestimated the amount of custom toolbars :)
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Chose which workbeches load at start up [Feature Request]

Post by openBrain »

To me the problem here isn't that it's possible or not to load workbenches on startup, but just that custom toolbars aren't correctly loaded.
User avatar
chennes
Veteran
Posts: 3909
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Chose which workbeches load at start up [Feature Request]

Post by chennes »

openBrain wrote: Thu Aug 05, 2021 5:18 pm To me the problem here isn't that it's possible or not to load workbenches on startup, but just that custom toolbars aren't correctly loaded.
Right - having to manually choose workbenches that get loaded at startup is sort of a workaround for the problem that when a custom toolbar is loaded it doesn't automatically load the workbenches that it relies upon. I have not looked into what that would require. That said, I'm poking at the autoload right now since it's a pretty easy modification to the existing interface.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Chose which workbeches load at start up [Feature Request]

Post by openBrain »

chennes wrote: Thu Aug 05, 2021 5:36 pm I have not looked into what that would require.
Me too. :lol: I just wanted the problem to be clearly stated. First step for a good solution to be found. :P
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Chose which workbeches load at start up [Feature Request]

Post by Zolko »

chennes wrote: Thu Aug 05, 2021 5:36 pm a workaround for the problem that when a custom toolbar is loaded it doesn't automatically load the workbenches that it relies upon.
I don't think that a command "knows" in what workbench it is defined. So if you include a command into a custom toolbar, the toolbar can't know where its commands come from. If this is confirmed, then the only solution is for the user to pre-load the necessary workbenches.
try the Assembly4 workbench for FreCAD — tutorials here and here
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Chose which workbeches load at start up [Feature Request]

Post by openBrain »

Zolko wrote: Thu Aug 05, 2021 8:16 pm If this is confirmed, then the only solution is for the user to pre-load the necessary workbenches.
There are at least 2 other solutions :
* Add a mechanism so UI core knows which workbench a command belongs to, and can load it
* Load all active workbenches at startup
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Chose which workbeches load at start up [Feature Request]

Post by adrianinsaval »

At the time of creation of the custom toolbar the commands are categorized by workbench so I think it's possible to store that data, for commands that were added to a toolbar before this is implemented in FreeCAD that data could be stored the first time the command's workbench is loaded. Something to keep in mind is that you can create global custom toolbars or workbench specific ones, how should the autoload behave when the custom toolbar is workbench specific? I think the required workbench for the command should be loaded when we open the workbench were the toolbar will show and not at startup (unless the workbench is needed for a global toolbar of course)
User avatar
chennes
Veteran
Posts: 3909
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Chose which workbeches load at start up [Feature Request]

Post by chennes »

Going back to the workaround for a moment (since I've gotten other requests for this feature), here's a possible UI for the Workbench preferences page:
Screen Shot 2021-08-06 at 5.42.12 PM.png
Screen Shot 2021-08-06 at 5.42.12 PM.png (30.46 KiB) Viewed 1665 times
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply