From BlenderWiki
Development Environment Setup
This document is split into 2 sections, one for C/C++ another for python, since you may be using one of the other and they both have very different requirements.
C/C++
If you already are familiar with a C/C++ development environment, most likely you can use it for blender development.
Otherwise, if you have no strong preference - its safe to choose the default IDE's on each platform.
- OSX - XCode
- Microsoft Windows - Microsoft Visual Studio (MSVC)
- Linux - (no default IDE but there are popular ones you can try)
IDE Quick-Start Links
Once you have blender building you may want to develop one of the many IDE's (or editors) that can be used with blender.
Since there are too many OS/IDE combinations, maintaining a comprehensive list of all would be difficult, so here is a list of documented configurations known to work well.
- OSX / CMake / XCode (TODO)
- Windows / CMake / MSVC2008 (TODO)
note:
- These docs assume you have blender already building.
- Some of these pages can be easily used between different operating systems.
Differences between SCons & CMake
Since we have two build systems here is some information about both to help you make a decision about which one to use.
SCons
- One step to configure/build/install - least hassle initially but slows down rebuilds.
- Note: scons has a BF_QUICK option to only rebuild specific modules which helps for faster rebuilds, however this needs to be used with care since it can result in invalid builds .
- Bundled with blender in the scons/ directory, you only need python2 to run it.
- does not auto-detect libs - this is not a problem on Windows or OSX but for linux if a library such as OpenEXR is missing, the build will fail, the library must be installed or SCons configured to disable it.
- no integration with any IDE's, SCons can still be called from an IDE, but it has no project file generation as with CMake, so the IDE won't have any defines or include paths from the build-system.
- no way to define system includes (system headers may give warnings).
- configured by editing a python script 'user-config.py' or passing command line options.
- used for official builds and by blender.org buildbot.
CMake
- splits configuration/building/installing into 3 separate steps.
- Note: this may be better or worse depending on your point of view. More steps is more of a hassle initially, on the other hand configuring and copying files every time as SCons does, considerably slows down rebuilds.
- Linux/Unix Only - we have a convenience makefile so you can build by simply typing 'make' to build in 1 step as with SCons.
- Is an extra dependency and not included with blender.
- Libraries are auto detected, if a library is missing the feature will report as disabled but building will continue. *(not so much an issue on Win/OSX which use pre-compiled libraries).
- IDE integration
Blender/CMake project files have been tested to work in MSVC, Eclipse, KDevelop, Netbeans, Code::Blocks and QtCreator. - system includes are treated differently and don't give warnings.
- configured with a graphical tool, by editing CMakeCache.txt or command line arguments.
Notes
- CMake is not in fact a build system, but generates files for other build systems (a meta-build system).
- CMake project files on windows are know not to correctly rebuild (occasionally), this glitch needs to be investigated.
- Some of the differences listed are not inherent to either build system, just the way we have them configured in blender.
- There are longer comparisons between the 2 you can find online but for the purpose of building blender these are the main differences.
Python
While python scripts can be developed entirely inside blender, the built-in text editor is limited. Its convenient for short scripts or making minor edits but for large projects you will want to use an external editor.
With python development the choice of IDE/Editor is less of an issue as with C/C++, most developers just use their favorite editor.
Editors known to work well: scite, geany, notepad++, gedit and eric5.
If you're already familiar with vim or emacs they are fine too.
For more information on how to execute scripts externally see: Using an External Editor