Second Life Terrain Import and Export for The Gimp

Introduction
This python script allows the loading and saving of raw terrain files for Second Life® sims in The Gimp.
Installation
copy the file_slraw.py file to your Gimp plug-ins directory. Linux users should give it execute permissions.
Loading a raw file
If you have installed other raw file type handlers then automatic detection of the file type may not work. You must then select 'Second Life Terrain' manually. If gimpterrain is the only raw handler, you should just be able to select the file as normal.

Saving a raw file
If gimpterrain is the only raw file type handler you can just add a .raw extension to the filename. If you have another raw handler then just putting .raw as the extension is not enough as there are different types of .raw file. You'll need to select "Second Life Terrain" as the file type.

Comments
I get a TypeError exception with gimp 2.6:
File "/home/XXXX/.gimp-2.6/plug-ins/file_slraw.py", line 87, in python_fu_load_raw_terrain pr[ w, 0:height ] = r[ w::width ] TypeError: string is wrong lengthI just installed GIMP on a Win7 machine and copied your slraw.py script to C:\Users\Sparky\.gimp-2.6\plug-ins directory and it doesn't even register.
Could you give us the "slraw.py install & Use for Dummies" version?
There is an error in the file_slraw.py file that can be downloaded using the link near the top of the page. Change "GREY" to "GRAY" in line 126. Making this change allows the plug-in to work with version 2.6 of GIMP.
If you're having trouble getting the plug-in to work, it is likely because Python support is not installed or enabled in your GIMP install.
This tutorial explains how to install and get Python support working on Windows:
http://www.gimpusers.com/tutorials/install-python-for-gimp-2-6-windows.html
(I had the same problem, and realized that, even though I had Python installed, it wasn't seeing the plug-in)
--Talarus Luan
I'm trying the script in Win7 and I'm not getting it to work. I've checked that I'm using the right folder according to the Plug-Ins preferences. I have Python 2.6.4 installed. Is there anything additional I need to do? The Terrain raw file type just never appears... (._.)
I had the same problem and discovered that I needed to install Python support in GIMP. If you follow this tutorial, it should then work. Hope that sorts your problem!
Drew
I want to firstly thank you for excellent tutorials (Blender) and for the tools you produce for download. Your site has enriched my SL experience considerably, so thank you again.
My only battle at the moment has been to get GIMP 2.6.6 to 'see' the plug-in, file_slraw.py, when it starts up. I run Windows Vista (shame, I know) and GIMP has not been able to see the Second Life RAW plug-in at all, even though I have now copied it to both GIMP locations on my drive - C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins - and - C:\Users\***USER***\.gimp-2.6\plug-ins.
Any ideas about what I am doing wrong? I do notice that there are no Python files in GIMP folders at all, and wonder if I need to use import or something somewhere, after I simply copied it to these two locations (first the one, tested, no luck, then the other location, again, no luck).
Thank you in advance,
Johan
Hi Johan,
I had the same problem with getting the plugin to load. It turns out that you need to make sure that GIMP is installed with the appropriate Python script extensions. This requires some extra extensions to Python to be installed before you install GIMP.
There's a tutorial at www.gimpusers.com/tutorials/install-python-for-gimp-2-6-windows.html for installing the necessary GTK bits to get Python-fu working, and how you can check to see if it's working properly in the GIMP GUI. Hope this helps anyone else with the same problem.
-- David Thompson
Hi, on Windows XP, Blender 2.49b, I copied the file_slraw.py in the folder "C:\Program Files\Blender Foundation\Blender\.blender\scripts"
and I launch Blender. No new entries are visible in the file import or export menus.
In the UV/Image editor, the "image open" menu don't show your dialog box. The "reset python modules search path" button does nothing. Could you say what is wrong in my installation ? Thank you !
Alain
Ermm... This is a script for The Gimp not Blender. It should be placed in
C:\Document and Settings\<username>\.gimp-<version>\plug-ins\