As the title suggests I would love to write some libraries that share some logic in Maya and Blender. Of course all plattform related code would be separate packages so “import pymel.core” and “import bpy” does not collide. But logic that is independet from Maya or Blender would be great to share between tools.
Some things I would like to have
- Sharing the Logic codebase with Maya and Blender codebase
- Logic codebase / Maya codebase / Blender codebase in different GIT repos NOT one
What would be a good approach to do so regarding
- library/project/package/module file structure
- Pythonpath? In Blender I can specify only one path to python projects. In Maya I can specify multiple locations in the userSetup.py via sys.path.append()
At the moment I have this structure:
I added “…Programming/Blender/lib” to the Blender addons path and the “…Programming/Maya/lib” to the userSetup.py. Each “myTool” project has its own GIT repo. That works great so far. What makes things more complicated is when both “myTools” from Maya and Blender would like to import a project/package that is common to both Maya and Blender.
I want to avoid copying packages/modules around.
Any thoughs or ideas to this?
Thanks in advance!