How to: Add Python Scripts Manually for Noobs

Ok– me, and I suppose a couple other people using the Blender (2.42) on Mac OS (Intel?) have had the some problems with adding scripts to the directory, and then Blender “seeing” them. For some reason, updating of scripts seems to be broken. Maybe this has been fixed, but if it hasn’t— or for people dont want to redownload Blender, then here is how to add a script manually, step by step :wink: :

  1. Download your script. Make sure that the file has the extension .py at the end. If it doesnt, change it please.

  2. Open up your blender folder. Right click on the blender app and select “show package contents.” For those of you who dont know, most apps in mac os are really just directories, and the actual binary is somewhere inside that. This puts most of the necessary files in one place, and allows for those “drag and drop” installs we know and love.

  3. Then, without closing that, search (within that “package”) for .blender. Inside this subfolder should be two files: a document called bpymenus, and a folder called scripts.
    Go ahead and make an alias of that .blender folder and place it wherever you want, so you can get to it easy.

If you have an app like tinkertool, macpilot, or mainmenu, you can just “show invisibles/hidden” to see this.

  1. Double click on your downloaded python script. There will probably be a header like this at the top:

Name: ‘ASCII Scene (.ase) v0.6.2’
Blender: 240
Group: ‘Export’
Tooltip: ‘ASCII Scene Export (*.ase)’

remember that number- in this case 240.

  1. Now open up that bpymenus file in textedit. Scroll down to the group your script should be in- in my case it would be ‘Export.’ Make a new line (hit return).

  2. Type your infos like all the other lines, but replace the. It should look just like this:

‘3D Studio (.ase)…’ 240 0 ‘Export to 3DS file format (.ase).’

The first bit before the elipsis is the name that appears, the part that says (in mine) is the name of the file (copy directly from the file on the desktop, or wherever your script is), and last bit is the description. Change yourse as necessary. The number (240 in mine) is the number from before. Save the list.

  1. Move the python script to the scripts folder.

  2. Open up blender, and use it!

This looks like a pretty ugly workaround, but its not really complicated at all. Hells if I know what the problem is, but untill it is fixed…

Have fun! :smiley:

Edit: Btw, try adding your script to the .blender > scripts folder and then updating first, before you do this. If built in method works, then you will save yourself alot of time.

Thanks for that little tutorial, Darkplaces. Unfortunately my file path is not the same. :spin:

When I click “Show Package Contents” for the Blender app, the inside file hierarchy looks like this:

Blender >

  • Contents >
    • info.plist
    • Mac OS >
      • blender (Not sure what kind of file this is. There’s no extension. Maybe binary?)
    • PkgInfo (Also no extension.)
    • Resources >
      • blender file icon.icns
      • blender icon.icns
      • locale > (Inside are 22 subfolders that seem to be for language support)

Nowhere do I see anything that even remotely resembles a Python scripts folder.
I’ve never been able to figure out how to add .py scripts on a Mac since I’ve started using Blender, but up to this point I’ve always just used my Windows machine when I wanted to use scripts. Unfortunately my Win machine is too slow for this particular job and I need to do it on the Mac. But I really need to know how to do this anyway, so if anyone can help me, please do!

Thanks in advance,

OK, I got it! Didn’t realize TinkerTool was necessary.
For those who are having the same issue, I will summarize the steps:

  1. Download and install a free third-party utility called TinkerTool. Launch it and check the option to “Show hidden and system files”.

  2. Right click (or Ctrl+click if you’re ghetto) your Blender application, and from the menu that pops up, select “Show Package Contents”. Another Finder window will pop up.
    Within it, go here: Contents > Mac OS > .blender > scripts
    Put your .py files in here. It is a good idea to make an alias of the scripts folder and store it somewhere more accessible.

NOTE Be careful when installing a newer version of Blender that you back up your scripts folder first. I believe it overwrites the folder, so you would lose the scripts you’ve collected.

I just copy the .py script file into my blender.blender\scripts folder. Then in Blender I drag down the top user preferences area and under File Paths I click on the “re-evaluate scripts registration in menus” button near the end of the Python field. Then you will see your script choice listed in the Scripts menu. If its an import or export script, it will be listed under the File/Import and/or File/Export choices.