[Bf-python] Current directory problem

Manuel Bastioni manuelbastioni at tin.it
Sun Sep 26 21:41:44 CEST 2004


Hi.

I've problem to make MakeHuman installation super easy.

I need a python function that return the location
of blend file that contain the script itself.

Example:

I put makehuman.blend in C:/foo/foo1/toto/pippo/

I open makehuman.blend

I run a script from the text buffer of makehuman.blend

The script return "C:/foo/foo1/toto/pippo/"

If I change the position of makehuman.blend, the script
return the new path...
Of course, this script should work under mac and linux too.

I've tried with Blender.Get('filename'), but it seem return
only the last file saved...

Any ideas??

Thanks,

                    Manuel





More information about the Bf-python mailing list