adding python scripts to blender

Blender documentation projects, tutorials, translation, learning & teaching Blender

Moderators: jesterKing, stiv

ckopins
Posts: 4
Joined: Thu Jul 29, 2010 5:17 am

adding python scripts to blender

Postby ckopins » Sun Aug 08, 2010 8:37 am

hello blender community,
Im trying to import a python script into blender so I can make .xml files so I can load images in JME. Iv been reading tutorials and can't seem to figure it out. Iv been seeing things about putting the python files in .blender/scripts and adding to the scripts directory, but I don't have a folder of that sort. I do have a plugins folder but it only contains "include", "texture", and "sequence." not "scripts" folder. I am using a mac if that helps solve anything, thanks for the help.

psullie
Posts: 554
Joined: Thu Sep 11, 2008 11:09 am
Location: Ireland

Postby psullie » Sun Aug 08, 2010 10:53 pm

hello, there are a few ways to get your scripts into Blender. the easiest is to open your script as a text file in Blender and use Run Script (Alt P). To make is accessible as a menu item you need to put it in either the Scripts folder or (recommended) an external scripts folder. The first is difficult to find as it's hidden inside the application. In Finder -> Go -> Go to Folder (Shift+Apple+G) and type in the following (for 2.49b): /Applications/blender249b/blender.app/Contents/MacOS/.blender/scripts/
for 2.5x:
/Applications/blender253/blender.app/Contents/MacOS/2.53/scripts/
The easier option would be to create a MyScripts folder somewhere on your Mac and in Blenders User Prefs, select this as an external Scripts location, save this as a default and every time blender launches it'll load find your scripts.

ckopins
Posts: 4
Joined: Thu Jul 29, 2010 5:17 am

Postby ckopins » Tue Aug 10, 2010 2:07 am

thank you very much for the help, that was more descriptive and way better than any tutorial I read, thanks again!

fontendet
Posts: 1
Joined: Fri Jan 21, 2011 8:09 pm

Postby fontendet » Fri Jan 21, 2011 8:17 pm

This info from psullie really need to be added into readme file with packet.
In readme we have only this info:
the .blender directory is in Blender.app/Contents/Resources/. This is being located by default. If you like to alter some of the files, copy this directory to your home dir.
and i was tired to search for that .bender which hidden there - to install nif scripts.
Also don't forget to drop pyffi folder there. Tutorial here:
http://forums.civfanatics.com/showthread.php?t=307885

However in WinXP i made all from the scratch, but i really like working in Mac OS X - because mac system much stable and really multi-tasking because of dock with all apps & second monitor.


Return to “Documentation & Education”

Who is online

Users browsing this forum: No registered users and 1 guest