The source code for the Core and the Blender exporters can be found here (exporters for other 3d software can be found on the forum):
The repository is separated into several lines of development:
Git, it's needed to download files from git repositories and keep your repository updated. Alternatively, Github also allows downloading snapshots as archives.
To get the YafaRay official source code with git, get them from git://github.com/YafaRay/Core.git. For the Core, on Linux/Unix machines usually this means you have to open a console and write:
$ git clone git://github.com/YafaRay/Core.git
and for the exporters (you need only the one corresponding to your Blender version):
$ git clone git://github.com/YafaRay/Blender-2.49-Exporter.git
$ git clone git://github.com/YafaRay/Blender-2.5-Exporter.git
At this point you should have the directories with the YafaRay source code and the exporters.
Note: The code is mainly tested on Linux (32 and 64bit) and Windows (32bit) and OS X (intel). Other platforms may require some work on configurations. For additional information about customization etc., please read the "INSTALL" in the source tree. |
The YafaRay source code provides several features:
YafaRay libraries and binaries could be used stand alone with YafaRay XML scenes or as a library by other software. Look at LGPL licensing for that.
They will also provide the GUI to show a render in progress.
Compiling YafaRay happens via cmake.
The YafaRay build system gives builders the ability to customize features. All features are enabled by default. If you want to customize them:
For a specific example, if you don't need the Qt GUI, you need to disable it by changing set(WITH_QT ON) to set(WITH_QT OFF) in your UserConfig.txt.
On Linux, you should have no problem getting all the libraries via your package manager, as they are all used in well established linux applications. Just don't forget to install the developer versions (for headers and libraries) too.
Here we list all the dependencies needed for a build with all features enabled.
pthread (wrapper library for Windows)
libxml (for xml loader)
libjpeg
libpngOpenEXR
freetype 2
zlib
Qt
At this point you should have the YafaRay sources and all dependencies needed to build YafaRay libraries and binaries. To do that you have to open a console and from the YafaRay source folder write:
$ mkdir build
$ cd build
$ cmake ..
$ make
If everything worked with no errors you can install with (you could need to be root):
$ make install
By default YafaRay installs to /usr/local path, but this can be configured in UserConfig.txt.
YafaRay bindings are used to access YafaRay library features via other languages (used by the YafaRay exporter for Blender 2.49 for example).
For building the Python bindings you will also need SWIG
Developer packages for whichever language bindings you want to compile.
To build the Python bindings with Python >= 3.2, SWIG (>= 2.x) needs to be patched and built by hand until SWIG officially adopts these patches. The two necessary patches are in the git repository in the directory SupportFiles.
Quick version, enter your SWIG source code directory and apply the patches:
$ patch -p1 < swig-pycapsule.patch
$ patch -p1 < swig-pyslice.patch
See also the README in the SupportFiles
directory.
The bindings are built automatically with the rest. To point CMake to the right locations for SWIG and Python, you can set several variables in CMakeConfig/UserConfig.txt:
TODO WIN32
Outdated from here on! |
If you are using the Visual Studio 8 Compiler, you can now get all libraries except Qt precompiled in SVN too: svn co https://ssl.little-isp.de/svn/lynx/yafaray/libs
They were all (except libjpeg, which is from the old yafray repository) compiled with MSVC8 using dynamic runtime.
On Windows, the librariess directory is assumed to be on the same level as the directory containing the sources. To achieve this, do the checkout commands in the same directory, for example if you do it in "C:\SomeDir" it should look something like: C:\SomeDir\yafaray
C:\SomeDir\libs
The YafaRay Blender exporter project uses a SVN repository for source code. The main repository url is:
svn://svn.yafaray.org/repo/yafaray-blender
The repository is separated into several lines of development, with,
Subversion or any other equivalent software. It's needed to download files from svn repositories.
To get the official YafaRay Blender exporter you need to use your subversion software and get them from svn://svn.yafaray.org/repo/yafaray-blender/mainline
On Linux machines usually this means you have to open a console and write:$ svn co svn://svn.yafaray.org/repo/yafaray-blender/mainline yafaray_blender
To get the YafaRay Blender exporter experimental code you need to use subversion software and get them from one of the branches.
There is currently one branche under development:
darktide branch: this is the main branch used to keep track of experimental features and bug fixes before being tested and moved to mainline.
To get darktide branch exporter code you need to use your subversion software and get them from svn://svn.yafaray.org/repo/yafaray-blender/branches/darktide
On Linux machines usually this means you have to open a console and write:$ svn co svn://svn.yafaray.org/repo/yafaray-blender/branches/darktide yafaray_blender
These scripts together allow the export from Blender. The scripts should be installed like this:
yafaray/bindings/python
-- only available after you issued scons swig
, see above) into either~/.blender/scripts/yafaray
/usr/share/yafaray/blender/
(for a installation for all users). In the latter case, each user should copy the script yafaray_ui.py
into ~/.blender/scripts
(or you install it also globally, but must then ensure that Blender reads the directory you copy the script to as its script directory).