[Bf-committers] From the Game Engine, get the name of the .blend file
Campbell Barton
ideasman42 at gmail.com
Fri Feb 24 11:08:41 CET 2012
# this gives you the dir that the current blend file is in (but not
the filename of the blend file)
path = bge.logic.expandPath("//")
On Fri, Feb 24, 2012 at 8:36 PM, Damien Touraine
<damien.touraine at limsi.fr> wrote:
> Hi,
>
> I would like to get the name and the path of the currently loaded file
> inside the Game Engine. I tried to import bpy and get bpy.data.filepath,
> but I can't even import bpy : "No module named bpy".
>
> Regards
> Damien Touraine
> PS : I user Blender SVN revision 42510
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
--
- Campbell
More information about the Bf-committers
mailing list