OS: Windows

Python version: 3.7.4 (is in path, system wide install)

Blender version: 2.83 (from current source)

Issue: I can't get Visual Studio to show code suggestions past the main bpy level. enter image description here

I followed the steps to build blender as a python module exactly but I can't seem to get it to work properly: https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule

How could I build bpy to work like any other library?

Importing bpy into python console works:

enter image description here

For reference, listing modules in the console shows these modules do exist enter image description here

  • $\begingroup$ Can you confirm that bpy imports Ok into python console. Currently I am having issues with bpy build. Builds fine wont import. Get this error blender.stackexchange.com/questions/90072/… $\endgroup$
    – batFINGER
    Apr 4 '20 at 17:45
  • $\begingroup$ Updated the post @batFINGER $\endgroup$ Apr 4 '20 at 17:58
  • $\begingroup$ of more interest would be import bpy Printing help modules works for me too, but importing doesn't. And without import no intellisense. $\endgroup$
    – batFINGER
    Apr 5 '20 at 1:42
  • $\begingroup$ Can confirm import bpy works in console as well $\endgroup$ Apr 5 '20 at 14:06

The problem was that for some reason the available docs don't work for Visual Studio Community, but they do work for VS Code.

I feel like VS Community just doesn't know where to look for the rest of the definitions bc if you move the entire 2.83 file from bin\Release\ to C:\Python37\, the IDE actually shows some code suggestions but not everything. At this point it's easier to just use VS Code for addon development and VS Community for blender development


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.