[Bf-python] Build and use blender 2.63 as standalone python module on windows

Yu Du answeror at gmail.com
Fri Jun 15 15:20:02 CEST 2012


I have followed [this page](
http://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule) to
build blender 2.63 as standalone python module on windows, using MSVC9.

It failed for not found header file `utfconv.h`. So I add following code to
`blender/intern/ghost/CMakeLists.txt`:

```
if(WIN32)
list(APPEND INC
../utfconv
)
endif()
```

Now I get `bpy.pyd` and it works well in interactive python command line.
But when I run my scripts using:

```
python xxx.py
```

I faied and said:

> read blend xxx.py
> Failed to read blend file: "xxx.py", not a blend file
> ...

I found there is

```
BLI_argsParse(ba, 4, load_file, C)
```

in main function of `source/creator/creator.c`. So I used a `ifndef` to
disable it.

I read the guideline of the bug tracker. It seems that it's proper to post
it here. Maybe it will help someone who want use it as standalone python
module on windows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20120615/22e0d433/attachment.html>


More information about the Bf-python mailing list