[Bf-python] configuring content assist in IDEs for blender-python
Campbell Barton
ideasman42 at gmail.com
Tue Mar 15 11:33:34 CET 2016
On Sun, Nov 22, 2015 at 4:59 AM, Jonathan Railsback
<jonbitzen at hotmail.com> wrote:
> I built the bpy shared object module according to the following
> instructions:
>
> http://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule
>
> After performing the steps, I successfully got a bpy.so with a few other
> things in my build_linux directory.
>
> So, after getting these artifacts successfully installed in my python
> modules path, I am able to get content assist on the
> bpy modules in PyCharm. However, I am not able to get content assist for
> either bpy_extras or mathutils.
>
> Are those modules special somehow?
>
> I ran a command line python3 interpreter, and I found the following things:
>
> - I can import bpy OK
> import bpy
>
> - I can only import either mathutils or bpy_extras if I have already
> imported bpy, as follows:
> import bpy
> import bpy_utils # if I import bpy_utils before
> bpy I get an ImportError, no module named bpy_utils error
>
> - I can't do a from ... import
> from bpy import bpy_utils # doesn't work
>
> So it seems like there's some interdependency between bpy, bpy_utils, and
> mathutils.
Right, mathutils is a module defined in C, which is only added once
bpy is imported.
bpy_utils doesn't exist (at least it doesn't come with Blender)
> If I could understand the import behavior I might be able to report
> something to JetBrains that was cogent enough for them to
> fix PyCharm to recognize these modules, but I'd be happier talking to them
> if I first understood this import behavior.
>
Doubt there is anything they could do about this.
> Apologies in advance, Im a bit new to Python, so my questions may be fairly
> basic.
>
> Thanks
>
> beanworks42
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
--
- Campbell
More information about the Bf-python
mailing list