Hi, I’m trying to restructure and optimize my project and I can’t solve one issue so far.
So let’s say I have this structure:
parent_folder/ # This is a parent folder that is added into environment path, project_name/ moduleA/ __init__.py file1.py file2.py moduleB/ moduleC/ __init__.py file1.py file2.py __init__.py file1.py file2.py __init__.py globals.py
So, if I leave init files blank, then if I do this in Maya:
import project_name as pn pn.moduleB.moduleC.file1.do_something()
It says that module pn does not have moduleB.
Now let’s assume I add “import moduleB” into the root init.py file. And try this:
from project_name.moduleB import moduleC
It will also state that moduleB has no moduleC. Etc. So basically it does not import anything that was not imported in init file. I do believe I’m doing something wrong here. How should I approach this?