Blender 2.49 scripting question

Hi everyone,

I’m working at a university with a Nextengine 3D scanner doing scans of cylindrical rock samples. They need a script so that it is easy to bake the texture from the rock sample onto a cylinder. I don’t have any experience in Blender or python from before this project but have already learned alot.

I’m trying to write this script so that anyone can use it without any knowledge of blender - I have created a gui from my script but am having some problems.

Currently I have saved a .blend file with my desired panel layout, when this is finished I will have them open this blend file so that everything is where they expect it every time.

I am using the run command to import a .obj but when I do it shuts down my scripts gui. I would like the file browser to open up in a different panel than the one my gui is in. Here is that function that is run when the button is pressed.

def myImport():
Run("/Applications/Blender/Blender 2.49b/")

Is there a better way to import an .obj from a python script? I would also like to know if I can somehow capture the name of the mesh into a variable when it is imported. Right now I’m using myRecordName() to go through all the mesh objects in the scene and use their names for my mesh variable (the scene is cleared before import).

Any advice is much appreciated.

Feel free to examine the scripts in my signature. Meshfoot loads and manages a series of OBJ files. So there is load code and browsing to a file code in that script.