Installable - Add-on Workbench

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Installable - Add-on Workbench

Post by keithsloan52 »

With a new style installable Workbench on Linux the repro gets installed into .FreeCAD/Mod/<Workbench Name>

How is a user supposed to find Sample files etc via the normal FreeCAD facilities?
Syres
Veteran
Posts: 2900
Joined: Thu Aug 09, 2018 11:14 am

Re: Installable - Add-on Workbench

Post by Syres »

Would it be unrealistic to expect the Wb author to create a command that creates a File>Open dialog pointing to FreeCAD.getUserAppDataDir() /Mod/WbName/Samples for example? The fonts dialog button in Draft>Shapestring taskpanel comes to mind though for different reasons.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Installable - Add-on Workbench

Post by keithsloan52 »

Syres wrote: Fri May 29, 2020 11:08 am Would it be unrealistic to expect the Wb author to create a command that creates a File>Open dialog pointing to FreeCAD.getUserAppDataDir() /Mod/WbName/Samples for example? The fonts dialog button in Draft>Shapestring taskpanel comes to mind though for different reasons.
But that means an extra icon/command, surely FreeCAD basic File>Open should also offer access to other directories in .FreeCAD/Mod
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Installable - Add-on Workbench

Post by yorik »

keithsloan52 wrote: Sun May 31, 2020 1:56 pm surely FreeCAD basic File>Open should also offer access to other directories in .FreeCAD/Mod
Not sure how that could/should be done cleanly.
I also think the WB author should solve that themselves. I would go for having an "open example..." menu item, which pops up a Qt File Open dialog in the right folder. Alternatively, you could have your WB perform a check on first run and copy example files to the FreeCAD examples folder, but I'm not sure this is such a good idea to mix things that way... Seems a better idea to keep example files inside the WB folder so they are easier updatable/uninstallable
Post Reply