From BlenderWiki

Jump to: navigation, search

Building the COLLADA GSoC branch

svn checkout

The COLLADA module can be built on Windows, Mac and Linux using scons or cmake.

OpenCollada prerequisites

OpenCollada depends on libexpat and libpcre so these libraries are necessary when you're building Blender or OpenCollada.

The next section is for Linux users who have to build OpenCollada manually. On Windows and Mac pre-built libraries are available. Skip the following section if you're not a Linux user.

Building OpenCollada

Checkout revision 827

Note, OpenCollada has changed it's repository to Make sure to make a fresh svn check out.

svn checkout opencollada 

or if you have a working copy already:

svn update -r 827

Build OpenCollada

scons XMLPARSER=expatnative

Copy libs into ./lib

Blender's scons and cmake expect OpenCollada's libs to be in [opencollada-dir]/lib directory. Create ./lib and copy OpenCollada libs into it with:

mkdir lib
find . -iname "*.a" | xargs cp -vt lib

Building the COLLADA branch

  • scons

Add these lines to your

BF_OPENCOLLADA = "[opencollada-dir]" # replace [opencollada-dir] with an _absolute_ path to your opencollada source tree


python scons/
  • cmake
mkdir build-cmake
cd build-cmake
# generate makefiles
cmake -G 'Unix Makefiles' -D WITH_OPENCOLLADA=ON -D OPENCOLLADA=[opencollada-dir] [other build options] [source-directory] # optional: -D CMAKE_BUILD_TYPE=Debug

Note: [source-directory] is NOT optional in the above cmake command. Just replace it with your blender source directory (as usual with cmake out-of-source builds).

You can also set PCRE and EXPAT paths with the above cmake command. By default they are expected to be in /usr/lib and /usr/include.

Replace [opencollada-dir] with a path to your opencollada working copy or the path to the pre-built OpenCollada library if you're on Windows.