poly-hammer / BlenderTools

Blender addons that improve the game development workflow between Blender and Unreal.
https://poly-hammer.github.io/BlenderTools/
MIT License
188 stars 13 forks source link

Restructure addon folders in repo to take advantage of Blender Script Directories #29

Closed jack-yao91 closed 2 months ago

jack-yao91 commented 3 months ago

Hi this is a proposal to move the blender addon folder locations into a src/addons folder in the repo. This would make development easier because devs can link the addon source code directly to their repo instead of doing the symlink setup like in the docs. That way line tracebacks are correct and debug break points work with a debugger.

I believe in one of the Blender 3 releases they added this. But I could update the docs to use this instead. The reason we would need to change the repo structure is these require an addons sub directory for blender to pick these up. image

Also on another note. How would people feel about me adding a .vscode folder to the project for the vscode people? My typical workflow is launch from vscode, then attach to the debugger via debugpy. Would people be oppossed to me making a PR adding this? Also moving the addons into src/addons?

Let me know, thanks!

JoshQuake commented 3 months ago

I have no issue with that at all. Anything to make our lives easier!

We should prepare for 4.2's addons repo system as well to take advantage of it if we can. Though looks like you need to replace all references to the addon's module with "package" which breaks 3.6-4.1...

Alternatively we can say screw the new system and just implement our own check for updates.

jack-yao91 commented 3 months ago

Yea good point, I can look into that, would be nice if we could get these available on https://extensions.blender.org/

JoshQuake commented 3 months ago

I would love to especially if there's a way it can be automated. I didn't immediately see a way so I was thinking making this repo compatible as a remote repo instead of manually uploading updates to blender's repo image

Though for addon visibility it would prob be better to be on extensions.blender.org so I have no problem with manual uploads. Just need a way to make the __package__ modifications automatically in a second zip to maintain 3.6-4.1 compatibility I think.