Non classé

How to install python libs in Blender (part 1)

EDIT 2020: This series is now obsolete since Blender 2.80. Please see this answer on StackExchange. Here is a possible function to install modules inside Blender, provided you can modify the Blender directory:

import subprocess

def install_pip_dep(module_name):
    python_path = bpy.app.binary_path_python
    subp = subprocess.run([python_path, "-m", "ensurepip"])
    if subp.returncode != 0:
        return False
    subp = subprocess.run([python_path, "-m", "pip", "install", module_name])
    if subp.returncode != 0:
        return False
    return True

if __name__ == '__main__':
    install_pip_dep("triangle")

In this article, we share some tips to install third-party python libraries for your scripts and add-ons. This is the easy way, when the library exists on repositories accessible to package managers such as pip.

Making Blender tools outside of Blender (part 1)

Two years ago, when I started working with Blender coming from Maya, I was very frustrated by Blender’s GUI limitations for TDs. The options for creating tools looked too limiting, and still are as far as I’m concerned.

Don’t get me wrong, there are great designed features for TDs. Creating an operator is easy and then you can use it everywhere you need, the API is strong and I like it. My complaint is more about windows and widgets. And I had to find solutions.

Opening the kitchen

La Cuisine is the blog of the technical department of the French studio Les Fées Spéciales. Established in 2015, based in Montpellier (in the south of France), the studio creates animated images, CG and digital 2D animation for feature films, shorts, museums or other companies. The studio relies on two main aspects: social innovation, through the use of a cooperative structure, and…