Hi, I’m the guy who wrote the vscode debugger addon and saw this thread and thought I’d chime in.
I personally don’t care that much about autocomplete (part of this is VS Code’s fault because there was a problem with module autocomplete being so slow it was unusable), so I got used to keeping the blender api documentation open in another window, buy many do and I’ve had many many questions about this.
While I agree debugging can be left to addons, for autocompletion, this overcomplicates things in the sense that there is already a solution that works well (blender as a python module) that doesn’t require anyone write any complicated code to extract stubs. Also I’ve tried all the python stub generators and they’ve all had problems. They also tend to become un-maintained sometimes.
So for autocomplete, the solution is blender as a python module, BUT…
- The building blender as a python module wiki page disappeared? I’ve been meaning to ask, what’s up with that? Is it going to come back? I watched the blender conference q&a and they said they’re not dropping it, so… ?
- Blender does not offer a download for blender built as a python module. I know it’s technically experimental, but there could just be a warning just like there is with 2.8 builds. Is there some reason why this isn’t done? Just doing this, would go a long long way.
- Because of the above, I think very few people know this feature exists, or what it can even be used for. I think you’d see a lot more use if people knew about it and it’s use for autocompletion.
- Although the wiki has a part about setting up your IDE, debugging, etc, for blender development, the equivalent for addon development does not seem to exist afaik. Actually now that I think about it, important stuff regarding addon development is kind of scattered everywhere (some in the API, some in the manual, some in the wiki, some in the old wiki).
- Building blender as a python module and installing it is not easy. I know, once you’ve done it a couple times, it’s hard to imagine, but that’s because all the hard stuff is done, now you just
make update
thenmake bpy
and in my case I made myself a little install script. But, just imagine if you’re a beginner who’s maybe only done a few blender scripts or a little bit of python. To get proper autocomplete, currently they would have to get python, git, svn, cmake, then if you have crap internet like me, wait a billion years to download the repo, be sure to get the submodules and libraries and all that, AND the 5GB worth of VS build tools, and that’s just the setup! Even I, who knew some of this stuff, but had never built any C/C++ programs, had a bit of trouble. And it felt like this completely unnecessary brick wall just for autocomplete.
Now technically part of my build troubles were my fault because I wanted to avoid having to download the 5GB worth of visual studio stuff because I already had just the build tools installed but the blender build script wouldn’t detect them. I solved it at the time and now thankfully you can use them without problems, and this is minor, but, maybe this should be mentioned in the wiki? It still says Visual Studio is required which it technically isn’t. Many people might already have the built tools installed.
Anyways, slightly unrelated, but does anybody use Anaconda? because I can’t seem to get the blender module to work if I install it in an environment, only if I install it to the base one.