Python Developement Enviroment for Blender - vvoovv/notes GitHub Wiki
Installation and Configuration
-
Install Eclipse IDE for C/C++ Developers from eclipse.org
-
Install PyDev with the Eclipse update site following the instructions at pydev.org
-
Configure PyDev: Window -> Preferences -> PyDev -> Interpreter Python Add a Python Interpreter here
-
Configure PyDev: Window -> Customize Perspective -> Command Groups Availability Check PyDev Debug
-
Download zip archive from airplanes3d.net or from the mirror and unzip it. Insert the full path to the blender executable in the following line of the file doc/refresh_python_api.bat:
blender -b -P python_api/pypredef_gen.py
-
Execute refresh_python_api.bat. Also execute it after installation of a new version of Blender. This Windows batch file calls the pypredef_gen.py script from doc/python_api directory. The result of the pypredef_gen.py script — the *.pypredef files for the corresponding Python API — are placed in the doc/python_api/pypredef directory. This directory should be referenced in the PyDev project configuration as the external library as described below.
-
Select the PyDev project, Project -> Properties -> PyDev PYTHONPATH -> External Libraries -> Add source folder Add doc/python_api/pypredef directory Press Force restore internal info after any change of the doc/python_api\pypredef directory
-
Download Run.py and adjust it in accordance with your settings
-
It is highly recommended to add Git perspective in Eclipse: Window -> Open Perspective -> Other... Select Git in the list
Debugging
-
Start the pydev server in the Eclipse
-
Switch to the Debug perspective in the Eclipse
-
Place Run.py in the Text Editor of the current Blender file
-
Press Run Script in the Text Editor of Blender with open Run.py file to start debugging