Blender Underground

Away from the watchful eye of The Man
It is currently Thu May 23, 2013 4:42 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Properly setting up Blender Paths
PostPosted: Mon Feb 23, 2009 8:16 pm 
Offline
Director
User avatar

Joined: Thu Sep 06, 2007 8:17 am
Posts: 5144
Location: West Virginia, USA
Many old hats here know that Blender and Python fit like a hand in a glove. Blender really isn't living up to its full potential without Python. This tutorial is designed to help new users install Python and setup Blender to use it. It isn't enough to simply have Python installed. Blender needs to know where to find its scripts. To further complicate the matter, Blender is multi-platform which means it stores those scripts in different locations depending on the platform it is installed on. Lastly, I really never understood the idea behind hiding the folder that houses the scripts you need to get at. Evidently neither does my Distributor of Linux since it places the scripts in a global location. Well, enough of that rant. Here we go....

First, you will need both Blender and Python.

http://www.blender.org
http://www.python.org

The version of python is important especially with pre-built Blender packages. Further, if you are running Linux, it is better to use your distribution's package manager to install these programs since different distros install them differently. Also, Python has a 2.6.* version that is currently incompatible with Blender so make sure you use the 2.5.* version!

Lastly, I can't verify installs for Mac since I don't own one. If you own a Mac and find an error in my tutorial here, as always, post below and I'll make appropriate corrections.

Once python is installed properly, you will get something like the following message in your console window:

Compiled with Python version 2.5.2.
Checking for installed Python... got it!

Make sure you get that message before proceeding!

The reason it is necessary to setup the paths is because it is possible to run multiple versions of Blender on the same machine as long as the configuration files are kept separate from each other. To avoid confusion as much as possible in this tutorial, I'll use the default Windows paths even though I'm using Linux. I will point out the differences when appropriate.

Once you have both installed, fire up Blender and go to the preferences page. It is hidden at the top of the screen. You want to select the "paths" tab:

Image

Depicted above is the default setup of every Blender install. (I purposely deleted the control file [.B.blend] that we will be creating at the end of this tutorial). A word on platform paths is next:

If you are using Windows, Blender installed itself to be "multi-user" meaning it creates the directory structure it needs to run at run-time. On Windows it can be found in the following location:

C:\Documents and Settings\<USERNAME>\Application Data\Blender Foundation\Blender\.blender

Where "<USERNAME>" is the username you use to log into Windows with.

On Linux (and Mac?) it is usually located in your home directory /.blender. On some systems (like mine) you may find that it is located in /usr/share/blender and /usr/lib/blender. Help is available in the forums here if you have trouble locating it. The thing is, you are looking for python scripts ending in "py".

Back to the paths boxes...

The paths listed from left to right with their associated Windows settings are as follows:

YFexport: -- Path to store the Yafray XML file used by the Yafray render engine. This path must exist before you fill this box in. It is optional just as the Yafray engine is optional. It can be safely left at its default.

Fonts:// -- Path to the fonts Blender can use. These are NOT the system fonts folder although some system fonts will work with Blender.

Windows Path should be set at:
C:\Documents and Settings\<USERNAME>\Application Data\Blender Foundation\Blender\.blender\

Render:// -- Default render path. This path can be overridden in the output tab. It is an optional field and can be safely left at its default.

Textures:// -- Default texture location path. This is an optional field that can be safely left at the default. It tells Blender where to look for texture files.

Python Scripts:// --Default location for all python scripts Blender will use. This is the important one to fill in. There is an additional button next to the file browser button that will refresh the script list AFTER you change this location. If you hit it before you fill this field out, nothing will happen.

Windows path should be set at:
C:\Documents and Settings\<USERNAME>\Application Data\Blender Foundation\Blender\.blender\scripts

Tex Plugins: --The location of texture plugins used for procedural textures. This is another important path.

C:\Documents and Settings\<USERNAME>\Application Data\Blender Foundation\Blender\.blender\plugins\texture

Sounds:// --Location of sound files. This is an optional field and can be overridden in the audio section of the buttons panel. It is safe to leave this field at the default.

Seq Plugins: -- Location of the plugins needed for the sequencer. This is another important field.

C:\Documents and Settings\<USERNAME>\Application Data\Blender Foundation\Blender\.blender\plugins\sequence

Temp: -- Location for temporary files such as quit.blend talked so much about here at BU. It is safe to use the temp folder in Windows for this "C:\Windows\temp"

Once you setup the paths, you need to tell Blender to keep them by using "File->Save Defaults".

That concludes this tutorial. You should now see a huge increase in the functionality once you update your python script list by hitting that refresh button or better yet, restart Blender and go to "File->Import" and see if you have a massive list of importers.

Enjoy and as always, if there is an error in this tutorial, post below and I'll fix it... :wink:

_________________
Life is an illusion....It's the magician you have to worry about!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 10:51 pm 
Offline
Associate
User avatar

Joined: Wed Mar 12, 2008 11:43 pm
Posts: 91
Location: Cracow, Poland
I thought that I've installed all properly but now it is far better :-) Nice tut!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 12:03 am 
Offline
Operative
User avatar

Joined: Sat Jun 07, 2008 5:34 pm
Posts: 182
Location: Central Coast California US of A
Hey Penix 1,

Thanks, especially about Python 2.6 - didn't know that and would have downloaded it next time
I check there since I got 2.5 already. Is that permanent or a coding mistake or the way Blender 2.48a
is now?

_________________
Keep your nose in the wind and your eyes on the skyline.
& have an beaching day!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 3:08 am 
Offline
Director
User avatar

Joined: Thu Sep 06, 2007 8:17 am
Posts: 5144
Location: West Virginia, USA
It's because 2.5 is stable while 2.6 is development. Also, the binary Blender was compiled using 2.5.

_________________
Life is an illusion....It's the magician you have to worry about!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 3:37 am 
Offline
Agent
User avatar

Joined: Thu Feb 12, 2009 9:18 am
Posts: 961
Location: Germany
Thanks a lot, penix. This tut would have and has saved me a lot of confusion.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2009 4:01 am 
Offline
Director
User avatar

Joined: Thu Sep 06, 2007 8:17 am
Posts: 5144
Location: West Virginia, USA
It was your thread that prompted me to write this. So you have yourself to thank for it.... :D

_________________
Life is an illusion....It's the magician you have to worry about!


Top
 Profile  
 
 Post subject: Re: Properly setting up Blender Paths
PostPosted: Sat Apr 04, 2009 2:20 pm 
Offline
Operative
User avatar

Joined: Tue Feb 10, 2009 5:49 pm
Posts: 190
removed by author

EDIT:

I retrieved the original files that came with blender and python. The:

I uninstalled blender... and didn't reinstall it, but for some reason I can still open blender and it works just fine... and it finds python. Is blender a zombie? :P

Oh wait, 10 mins later spyware was removed by my security from that original blender file which is from blender.org :? not that appeared to do anything.

All this stuff (^) isn't a problem, or doesn't appear to be a problem (yet/ever) just throwing that in there for anyone who is interested :P

_________________
"Screw the ninja rules, I have lung cancer!"


Top
 Profile  
 
 Post subject: Re: Properly setting up Blender Paths
PostPosted: Sun Apr 05, 2009 1:52 am 
Offline
Specialist
User avatar

Joined: Mon Jan 12, 2009 8:20 pm
Posts: 1843
Location: Australia
Just thought I'd add a sixpence worth.
I run Blender on a Mac.
I didn't need to install Python seperately as it was all done in the install.
The only thing that had to be done was to create a "Scripts" folder in the Blender folder and point Blender to it.


Top
 Profile  
 
 Post subject: Re: Properly setting up Blender Paths
PostPosted: Sun Apr 05, 2009 2:11 am 
Offline
Director
User avatar

Joined: Thu Sep 06, 2007 8:17 am
Posts: 5144
Location: West Virginia, USA
It's part of Linux too so all you have to do is point here as well. Thanks for that info Profnull. I'll add it to the text next week when I return from Emmitsburg.... :D

_________________
Life is an illusion....It's the magician you have to worry about!


Top
 Profile  
 
 Post subject: Re: Properly setting up Blender Paths
PostPosted: Sat Jul 04, 2009 5:39 am 
Offline
Operative
User avatar

Joined: Wed Apr 15, 2009 9:57 am
Posts: 370
Location: United Kingdom
In 2.49, 2.6 is the python used, it tells me that its got it, but doesn't give me acces to any scripts.


Top
 Profile  
 
 Post subject: Re: Properly setting up Blender Paths
PostPosted: Sat Jul 04, 2009 10:41 am 
Offline
Director
User avatar

Joined: Thu Sep 06, 2007 8:17 am
Posts: 5144
Location: West Virginia, USA
Did you setup the "Paths" properly as described in this tutorial? BTW, Blender can use any version of Python depending on how the config was setup when it was compiled. I have 2.492 here running on 2.5.4.

_________________
Life is an illusion....It's the magician you have to worry about!


Top
 Profile  
 
 Post subject: Re: Properly setting up Blender Paths
PostPosted: Sun Jul 05, 2009 2:44 am 
Offline
Operative
User avatar

Joined: Wed Apr 15, 2009 9:57 am
Posts: 370
Location: United Kingdom
No, my mistake, I had it installed for the wrong user, thus it was all messed, up. I reinstallde it and it's working fine now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr