7
$\begingroup$

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?

$\endgroup$
15
  • $\begingroup$ How did the build go? That file should exist if you set the WITH_PYTHON_MODULE flag to ON. $\endgroup$
    – CharlesL
    Commented Jul 1, 2013 at 17:33
  • 1
    $\begingroup$ @apratim, this feature is not meant for beginners, its experimental for devs who are already building blender and may even be removed at some point (though at the moment I see no reason to do so). Screencasts can be nice but can't be maintained when there are changes to the build process. Developers should be able to follow text instructions if there well written. $\endgroup$
    – ideasman42
    Commented Jul 2, 2013 at 21:02
  • 2
    $\begingroup$ Maybe, I cant say, I got this working once on a Windows-VM without doing anything special, but the wrong python version will fail for sure. --- Blender2.49 was the last stable version of blender to support python 2.x series. $\endgroup$
    – ideasman42
    Commented Jul 3, 2013 at 21:46
  • 1
    $\begingroup$ Voting to close this question, its less a question and more a request for support on building a specific configuration of Blender. $\endgroup$
    – ideasman42
    Commented Aug 22, 2013 at 9:44
  • 1
    $\begingroup$ This site is about using Blender, problems building Blender are out of scope. Note that MSVC2008 is no longer supported. (Only MSVC2013) $\endgroup$
    – ideasman42
    Commented Mar 1, 2015 at 0:37

0

Browse other questions tagged .