Blender 3D

NAVis comes with an interface to import neurons into Blender 3D for high quality renderings and videos: navis.interfaces.blender

Because NAVis requires Python at least 3.7 this only works with Blender 2.8x or higher!


Blender comes with its own Python 3.7 distribution! So you need to install NAVis explicitly for this distribution in order to use it within Blender.

There are several ways to install additional packages for Blender’s built-in Python. The easiest way is probably this:

  1. Find out where Blender’s Python lives (this depends on your OS). In Blender’s Python console run this:

    >>> import sys
    >>> sys.executable
  2. Check if Blender’s Python already came with the package manager pip:

    [..]/ -m pip --version

    If the above command throws an error along the lines of “No module named pip”: get pip by downloading from here and install by executing with your Python distribution:


    If pip is there but horrendously outdated, you can update it like so:

    [..]/ -m pip install pip -U
  3. Use pip to install NAVis (or any other package for that matter). Please note we have to - again - specify that we want to install for Blender’s Python:

    [..]/ -m pip install navis


It’s possible that this install fails with an error message along the lines of ‘Python.h’ file not found. The reason for this is that Blender ships with a “Python light” and you have to manually provide the Python header files:

First, find out the exact Blender Python version:

[..]/ -V

Next point your browser at and download the Gzipped source tarball from the exact same Python version, i.e. Python-3.X.X.tgz and save it to your Downloads directory.

Finally you need to copy everything in the Include folder inside that tarball into the corresponding include folder in your Blender’s Python. In a terminal run:

cd ~/Downloads/
tar -xzf Python-3.X.X.tgz
cp Python-3.X.X/Include/* [..]/
  1. You should now be all set to use NAVis in Blender. Check out Quickstart!


navis.interfaces.blender provides a simple interface that lets you add, select and manipulate neurons from within Blender’s Python console:

First, import and set up NAVis like you are used to.

>>> import navis
>>> # Get example neurons
>>> nl = navis.example_neurons()

Now initialise the interface with Blender and import the neurons.

>>> # The blender interface has to be imported explicitly
>>> import navis.interfaces.blender as b3d
>>> # Initialise handler
>>> h = b3d.Handler()
>>> # Load neurons into scene
>>> h.add(nl)


The interface lets you manipulate neurons in Blender too.

>>> # Colorize neurons
>>> h.colorize()
>>> # Change thickness of all neurons
>>> h.neurons.bevel(.02)
>>> # Select subset
>>> subset =[:2])
>>> # Make subset red
>>> subset.color(1, 0, 0)
>>> # Clear all objects
>>> h.clear()


Blender’s Python console does not show all outputs. Please check the terminal if you experience issues. In Windows simply go to Help >> Toggle System Console. In MacOS, right-click Blender in Finder >> Show Package Contents >> MacOS >> double click on blender.

Last but not least, here’s a little taster of what you can do with Blender:


The navis.interfaces.blender.Handler is providing the interface between navis and Blender.

navis.interfaces.blender.Handler([scaling, ...])

Class that interfaces with scene in Blender.

To manipulate objects (i.e. neurons, synapses and such):

navis.interfaces.blender.Handler.add(x[, ...])

Add neuron(s) to scene.


Clear all neurons, *args)

Select given neurons.


Hide all neuron-related objects.


Unide all neuron-related objects.


navis.interfaces.blender.Handler.color(r, g, b)

Assign color to all neurons.


Randomly colorize ALL neurons.


Change emit value.


Change transparency (True/False).


Change alpha (0-1).


Change bevel of ALL neurons.

Selections, *args)

Select given neurons.[...])

Select objects in 3D viewer

navis.interfaces.blender.ObjectList.color(r, g, b)

Assign color to all objects in the list.


Assign colors across the color spectrum.


Change emit value.


Change transparency (True/False).


Change alpha (0-1).


Change bevel radius of objects.


Hide objects.


Unhide objects.


Hide everything BUT these objects.


Delete neurons in the selection.