How can I import Blender modules into any external Python IDE and use its features from the IDE itself?
I found the tutorial "BlenderAsPyModule" but I am unable to follow it… specifically I could't find any such directory as "bin\bpy.pyd"
, as is specified in the link (under the section named 'Windows').
I am using Visual C++ 2008 express SP1 (whose download link is given in the above linked page), and cmake
on a 32-bit Windows 7 machine.
Here is the output log of generating build files using cmake
with Visual Studio 9 2008 :-
Blender Skipping: (bf_collada;bf_intern_ctr;extern_redcode)
Configuring done
Generating done
and here is the output log of compiling (release build) the mvs solution file (named 'blender') :-
1>------ Build started: Project: buildinfo, Configuration: Release Win32 ------
1>Generating (some_path)/blendersvn/blender/source/creator/buildinfo.h
1>-- Found Subversion: (some_path)/svn/bin/svn.exe (found version "1.8.0")
1>Build log was saved at "file://(some_path)\blendersvn\cmake-build\source\creator\buildinfo.dir\Release\BuildLog.htm"
1>buildinfo - 0 error(s), 0 warning(s)
2>------ Build started: Project: blender, Configuration: Release Win32 ------
2>Compiling...
2>buildinfo.c
2>Linking...
2> Creating library (some_path)\blendersvn\cmake-build\lib\Release\bpy.lib and object (some_path)\blendersvn\cmake-build\lib\Release\bpy.exp
2>Embedding manifest...
2>Build log was saved at "file://(some_path)\blendersvn\cmake-build\source\creator\blender.dir\Release\BuildLog.htm"
2>blender - 0 error(s), 0 warning(s)
========== Build: 2 succeeded, 0 failed, 121 up-to-date, 0 skipped ==========
It appears that there are no errors in these two steps. Is that correct?
Also, I copied bpy.pyd
that lies inside bin\Release\
(instead of inside bin\
as mentioned in the link) into \python27\Lib\site-packages\
, but there are no .dll
files in the bin\Release\
directory to copy.
And then (just to add) here is the ImportError
:
>>> import bpy
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import bpy
ImportError: DLL load failed: The specified module could not be found.
Am I missing any part of the process or doing it wrong?
WITH_PYTHON_MODULE
flag toON
. $\endgroup$