Search found 21 matches

Go to advanced search

by simonvanderveldt
Thu Mar 23, 2017 10:19 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

Wait a second... many add-on workbenches have a dash in their name. Like "Part-o-magic", "dxf-library", "freecad-nurbs"... Does it mean they have to be renamed? If they are to be normal Python models then there shouldn't be dashes/hyphens in their name, see https://sta...
by simonvanderveldt
Thu Mar 23, 2017 4:06 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

My understanding is that the Init.py is for initialization without gui. This gives the possibility to send information to FreeCAD when FreeCAD is used as a non-gui library. (eg.: information about supported file formats, but I don't know exactly) Yeah, this is also what I gathered. Init.py seems to...
by simonvanderveldt
Thu Mar 23, 2017 2:12 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

It seems like FreeCAD modules aren't required to have both an init and a GUI init module. I'm not sure if this is by design or not, but for now I've updated the code so it first checks if the relevant init module exists. If it does it'll be initialized, if it doesn't a message will be logged that no...
by simonvanderveldt
Thu Mar 23, 2017 9:32 am
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

first try fails (python3): Error in FreeCADGuiInit.py: Parent module 'freecad.modules.Arch' not loaded, cannot perform relative import Traceback (most recent call last): File "<string>", line 158, in <module> File "<string>", line 142, in InitApplications File "/home/lo/ana...
by simonvanderveldt
Wed Mar 22, 2017 10:39 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

to test this it would be nice to have the old imports also working. Would it be possible to re-add the deleted stuff: here and here . Alright, git was being a bit annoying so it took a bit longer than expected, but I've updated it now so that the new normal module imports are added next to the exis...
by simonvanderveldt
Tue Mar 21, 2017 6:42 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

Or are there also non-Python consumers of the .so files? This is what I was referring to - there may be more, but the only example I'm aware of is https://github.com/FreeCAD/FreeCAD/pull/624 (and I'm happy to change that method if someone knows of a better way to do it!). That's within FreeCAD anyw...
by simonvanderveldt
Tue Mar 21, 2017 6:39 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

to test this it would be nice to have the old imports also working. Would it be possible to re-add the deleted stuff: here and here . Yeah, I was already considering doing so. Will do so asap, though you should be able to start FreeCAD and the Start module/workbench with the current code. Can you t...
by simonvanderveldt
Tue Mar 21, 2017 4:53 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

After looking through the current modules I decided to start with the Start module to try to switch it over to a normal Python module because it's easy to see if it works since it's the first screen that pops up :) and it only has one dependency, the Web workbench. It's working and the modules as i...
by simonvanderveldt
Tue Mar 21, 2017 4:49 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

That's what I meant as well. The current FreeCAD module (.so file) would need to be moved into a package to make it work. I don't think we have to do this. For the modules we have to prefix the shared objects anyway. So these can stay where they are. Maybe we will do this for FreeCAD - shared libra...
by simonvanderveldt
Tue Mar 21, 2017 1:12 pm
Forum: Developers corner
Topic: Subfolder for Python modules
Replies: 79
Views: 1413

Re: Subfolder for Python modules

I think it's a good idea as it makes the FreeCAD Python interface more Pythonic. +1 One relatively minor question/consideration is that the FreeCAD module name (which as I understand things is only based on the .so/.dll for it?) might have dependencies outside of the FreeCAD Python interface - pack...

Go to advanced search