OK so I have sorted this out. I’ll explain how to get it working for posterity, in case anyone else tries to solve this.
I suspect that when the original directions were written, there was more stuff in the bin folder than there is now. When you build Blender as a pymodule, at least as of 2.79, there are no DLLs in the bin folder. Only the bpy.pyd file (and some other stuff which doesn’t help).
So you need to scavenge your regular Blender install for the missing DLL files that the original instructions refer to.
- compile Blender as a pymodule per the original directions provided at the following link:
- copy the bpy.pyd file to site-packages in your Python install
copy bin\bpy.pyd C:\Python35\Lib\site-packages\
- assuming you have a regular Blender install of the same version and bitness (x32, x64) that you built, copy the following DLLs to the site packages directory above as well:
- Note this is where I went off the rails. I thought they’d be in my build, but I didn’t find them there, I had to scavenge them from my binary install.
** Also note, do not copy over the python35.dll file, or if you do, delete it afterwards as the original instructions direct.
- Also in your Blender binary installation, find the folder 2.XX (in my case, 2.79), and copy the whole folder into your Python install directory (as above, copy it into C:\Python35).
After performing the above steps, I was able to get content-assist in Pycharm for the bpy module.
Also, as a note, I’ve found that the bpy.pyd file exports multiple python modules. For example, I know it exports a module called mathutils. It may have others that I haven’t poked into yet. To get IDE completion support for these other modules, you’ll need to go into your site-packages directory using the command line and create a symbolic link sort of like below for mathutils:
mklink mathutils.pyd bpy.pyd
Once you do that, the mathutils module can also be parsed from your IDE. I tested this using Pycharm 2017.2.1, and I was able to access stuff inside mathutils.
Please note that it MUST be a symbolic link. A shortcut like most folks are used to creating with GUI won’t work. They are different things.