Skip to content
Kai von Szadkowski edited this page Mar 27, 2018 · 35 revisions

Versions and Branching

Development of Phobos takes place on the master branch. While we try to keep it stable, please be aware that this is a bleeding edge version of Phobos, which we do not recommend for production use. Instead, choose the latest release version, which we continue to support with bug fixes after its release.

Dependencies

Blender

As of release 0.8 of Phobos, we only support Blender 2.79(a). This means it will not function properly any more for older Blender versions and might not function with later versions; Blender 2.8 is expected to include major changes that will not be compatible with Phobos.

(Ubuntu) Linux

On Linux, Blender can be installed via apt-get:

$ sudo apt-get install blender

However, this only works if your Linux distribution provides the correct version of Blender that is required for Phobos. If your system's default is outdated, you can add a custom ppa by Thomas Schiex:

$ sudo add-apt-repository ppa:thomas-schiex/blender
$ sudo apt-get update

If Phobos has not yet been adapted to the latest version of Blender, your best option is to install it locally. This is also a viable solution if you wish to avoid custom repositories, keep a system installation with a different version or install several versions of Blender in parallel. To do so, simply download and unzip a tarball from Blender's website.

Please note that glibc needs to be installed on your system to run Blender properly.

Windows

Installing Blender on Windows is as simple as downloading the installer from Blender's website and run it. Alternatively and similarly to Linux, you can download a zipped binary and directly run the unzipped executable.

Mac

Simply download the zipped version of Blender from Blender's website and run the unzipped executable.

Python

Blender ships with its own Python 3 environment and different versions of Blender use different versions of Python. However, it does not include a number of libraries Phobos requires, which is why Phobos extends Blender's Python path with the system dist-packages. For compatibility, as Blender 2.79 ships with either Python 3.5 or 3.6, you will need to have one of them installed on your system. Note that you can install the required version alongside your existing one (make sure your python or python3 command still points to the version you might need in other contexts). A guide for installing Python on different platforms can be found here.

PyYAML

Phobos uses the YAML language for some of its output formats and therefore needs the python module yaml, The easiest way to install is using pip. With multiple Python versions installed on your system, you need to make sure to run the correct variant of pip, which might be referred to on your system as pip3, pip-3.5 or some other expression, depending on your platform.

The following works if the latest version of Python3 is compatible with the version shipped with Blender.

Linux

Run these commands from the commandline to install both pip and yaml.

$ sudo apt-get install python-pip
$ sudo pip3 install PyYaml

Windows

For Windows pip installation follow the instructions here. Afterwards, use this command in the commandline to install yaml:

   pip3 install PyYaml

Mac

TODO

Getting Phobos

To get Phobos, clone its git repository on GitHub:

$ git clone https://github.com/rock-simulation/phobos.git

Then checkout the release version you want to use (in this example version 0.8):

$ git checkout release-0.7

In case you want to switch to a different release version use the same syntax to switch to the respective release branch. Alternatively, you can download the individual release version as a zip file from GitHub.

After downloading (and eventually uncompressing the archive file) to a local folder on your computer, you need to run the Python file setup.py in the top level directory:

$ python3 setup.py

or, depending on your system's Python configuration:

$ python3.5 setup.py

On Windows you need to make sure that you run Python version 3. py -3 setup.py should work. Otherwise, check this ressource. The installation file will automatically check the required yaml installation and configure the Phobos installation.

Activating Phobos in Blender

To activate Phobos in Blender, go to Files -> User Preferences -> Addons and search for 'Phobos' (it should be in the 'Development' category). Then tick its checkbox to activate Phobos and save your user settings in the lower left corner - if you don't next time Blender starts, Phobos won't be loaded. If Blender displays any errors at this point, you might want to check if you got the above steps right.

Phobos activation

Find Phobos in Blender's user preferences

If everything worked fine you can now find the Phobos toolbar as a tab in the left toolbar panel if you're running Blender >= 2.71, otherwise the Blender GUI elements will be added to the toolbar itself. If you don't see the panel, hit T.

Phobos toolbar

Updating

To update your current installation you just need to pull changes for the release you are working on and run the installation script again:

git pull
python3 setup.py

However, it might be, that you are using a release which is not maintained anymore, which will not receive bugfixes or updates. In that case updating will not change anything. Consider switching to a different release then.

Switching to a different release

To switch to a new release, you need to first update your local copy of Phobos and then checkout the respective release branch (NEWERVERSION, eg. 0.7 or 1.1):

git fetch
git checkout release-NEWERVERSION

After you switched to the different release follow the instructions in updating.

Troubleshooting

If you started the install script before yaml was installed...

Go to ~/.config/blender/BLENDERVERSION/scripts/addons/phobos/ and delete the file yamlpath.conf. Then you can re-run the install script and everything should work.

Clone this wiki locally