Menu

Home

TWINGSISTER
Attachments
pingfoo.png (145089 bytes)
pipmultidichinstall.png (168342 bytes)
pipversionAN.png (141108 bytes)

This TWINGSISTER's project is devised as a set of easy steps to enable someone (...mainly the authors..) to use Pip. Pip is a command line utility that represent the standard way for installing Python libraries and COTS. Blender is shipped with a Python interpreter with few libraries pre-installed. It is possible to add other libraries but the process is not so straightforward for the beginner. A first thing to note that the Python interpreter within Blender has nothing to do with the Python interpreter you might have installed on your machine.
With this addon one can easily use Pip when working with the two Blender addons called Sverchok nodes and Animation Nodes. This addon is based on the BlendBridge library. Following this approach step by step you will enjoy the installation of some Python packages using Pip.

First step: install Blender

The TWINGSISTER's projects contains a number of Blender addons. So to enjoy something here you first have to download and install Blender. Please use a search engine, look for Blender download and install it. Remember that, to enjoy TWINGSISTER's projects, you will have to download Blender's latest version (Blender 2.80). Pics in this document refer to Blender 2.79. Users familiar with Blender
will be able to adapt these examples to the new UI in 2.80. For the absolute beginners we advise them to go for 2.80 and use links we provide (boldface in the following) to some web demos we created. These web demos are taken from operations on Blender 2.80. For instance here is a guide to install a Blender addon. We keep here these outdated examples with the 2.79 UI believing that they convey some information anyway.

Second step: install Sverchok or AN and BlendBridge

Basically you need to download the BlendBridge plugin that is distributed as a perk in the internal TWINGSISTER fundraising champaing.
We refer you to the documentation for the Quadrics addon. There you will find all the instruction needed to install any of the TWINGSISTER addon. When you have installed BlendBridge you can opt to use either the Pip node either in Sverchok or in the Animation Nodes environment addon or in both. Please refer to the Quadrics documentation. for the supported versions of these addons. There you can find a link to downolad both Sverchok and Animation Nodes supported releases.

Third step: install PipBlender and test it

If you have reached this you now must be able to install an addon form the TWINGSISTER collection. So please download and install the addon contained in the PipBlender.zip file Here.
For Sverchock users
If you want to try PipBlender with Sverchok follow the web presentation here .
Operation with Animation Nodes are similar so you can learn most of what to do looking at this presentation for Sverchok.
If you are using Swerchok you will find a .json file in the PipBlender Examples. Import this as you have learnt in the previous steps. You will find the import button in the Node Editor
.
You can modify this scheme but note that. at least, the pip input line of this node must be always connected.. In the figure above the output for the simples case ever. Figure shows the result of a call to pip with the (wrong) argument --foo. Please note that the string --foo can be written in the text node menu in the red blob on the right.
For Animation Nodes users
Animation Nodes users need to build a node tree around the PipBlender node. When the node tree is ready they must click into the Execute Node Tree button in the Animation Nodes panel. The procedure is similar to the one listed here. If you are using Swerchok you will find a .blend file in the PipBlender Examples.. Loading this you will find yoursel in this situation.

In this example note that answer goes to the Python console in Blender. Usually you can toggle this console on by pressing, in Blender, Window>Toggle System Console (sometimes you must press it twice...). Now read on to Pip operations.
Pip operations
The PIPBlender node takes two string as input and execute whenever the check 0>Go is checked. If 0>Go is not checked nothing happens. After any execution of pip the 0>Go flag is unchecked. This is to prevent multiple calls to pip that can make the system quite instable. One can explicitly trigger execution by checking 0>Go and pressing the "Draw" button. Execution simply checks if Pip is present in the Python interpreter linked with Blender (that is not the Python interpreter installed on your machine !!!) and whether you have the latest pip version. If pip is not present or is not updated a pip version is downloaded and installed. Secondi PIPBlender takes the input paramenters <pip> and <file> and issue the command "pip <pip> <file>". If you do not need to give a specific filename simply leave the file input to String i.e. unconnected. If you need to give a filename please consider that. If <file> is an absoulte path or a URL, then is passed to pip with no change. Consider that URL seldom works and therefore is better to download packages in the whl format. A fairly complete archive is here . If <file> is a simple filename with no path then PIPBlender prepends to the file name the path where this addon is installed. Therefore you can distribute a package for your Blender addon simply putting the needed whl files in the root of the zip file containing PipBlender. The plugin installation mechanism automatically will place the bundled whl files in the right directory. Figure below shows the correct use of this pip node to install the package multidict-4.2.0-cp35-cp35m-win32.whl downloaded into the local directory d:\tmp
Please note that the whl package must match both Python interpreter (3.5.3 in Blender) and the machine architecture (win32 in the example) </file></file></file></pip></file></pip>

The wiki uses Markdown syntax.

Project Members: