Get a site

Git Clone

To clone a Git repository you should use the git clone shell command. For example:

The URL I choose points to the firefox-ios project repository.

The result would be a copy of firefox-ios in your hard disk. Precisely, Git creates a firefox-ios directory inside the current directory (the directory you were in when you executed the command from the shell).

If you want to give a different name to the directory that contains the repository local copy, you should execute the following command:

or, if you want to be more precise:

This way Git will create a directory named my-firefox-ios-clone inside the current directory.

Of course it is possible to specify an absolute path too:

Good clonations!

How to install JSONPickle module into Blender 2.74

What would you do if you need to encode the objects of a Blender scene in to a JSON string?

  1. You can write your own code specifically for the objects you need to encode. But it takes a lot of time and you have to write specific code for every new feature you need to encode.
  2. Or you can use the JSON encoder included in Python but it supports primitive data only; no custom objects.

The solution is called JSONPickle.

Unfortunately it is not included in Blender installation and it seems that there is no documentation around the Web that explains how to install and if it is impossible to install additional Python modules into Blender.

So, I googled and after few tests I found a way to install JSONPickle into Blender 2.74.

Then, let me lead you, step by step, into this installation process.

Step 1

Download JSONPickle from this Web page:

JSONPickle download page
JSONPickle download page

Step 2

Extract the archive.

JSONPickle GZIP Archive
JSONPickle GZIP Archive

The extraction will create a jsonpickle-0.9.2 folder.

JSONPickle directory extracted
JSONPickle directory extracted

Step 3

Enter the folder from your Command Line application.

Step 4

Execute this command and type the administrator password when prompted.

After some output the installation will end showing the following final lines.

Step 5

Now. Ignore the Python egg file that has been installed in your /Library/Python/2.7/site-packages (Mac OS X installation). But get into the jsonpickle-0.9.2 folder and look for the build folder. When found, double click it to show its content.

JSONPickle build directory
JSONPickle build directory

Inside it, there is a lib folder where you will find the jsonpickle folder, containing all the build products.

JSONPickle module directory
JSONPickle module directory

Step 6

Copy the jsonpickle build products folder inside the site-packages folder, in your Blender Python installation. In Mac OS X environment you can find it in this path: /Applications/Blender 2.74/ (since I have copied Blender installation directory in to /Applications directory and renamed it Blender 2.74).

Schermata 2015-09-06 alle 20.26.42

Step 7

Lauch Blender and copy this test code, inside a Text View.

JSONPickle test copied into Blender
JSONPickle test copied into Blender

Step 8

Execute the Python script inside Blender and verify the result in the Python Console.

Now you can encode any Blender object into JSON.

JSONPickle test output in Blender Console
JSONPickle test output in Blender Console