Blender Git Loki
Git Commits -> Revision 5c23537
Revision 5c23537 by Mitchell Stokes (master) August 28, 2010, 02:07 (GMT) |
Committing patch [#23278] (by me) This patch allows a user to pass binary data to LibLoad() to load a blend file from memory instead of a file path. I don't know how useful this will be for others, but I've used it so far for: * Decrypting .blend files and loading them without having to store the .blend on the hard drive * Pulling .blend data out of an archive and loading it (again skipping the hard drive) So, it seems the biggest use for this is skipping a bit of file IO (and possibly some security problems). Example usage: import bge with f as open('myfile.blend', 'rb'): data = f.read() bge.logic.LibLoad('Name', 'Scene', data) |
Commit Details:
Full Hash: 5c23537daa5c669b672528b0ed2bcaef2038f766
SVN Revision: 31626
Parent Commit: 5729b99
Lines Changed: +64, -9
6 Modified Paths:
/source/blender/blenloader/BLO_readfile.h (+13, -0) (Diff)
/source/blender/blenloader/intern/readblenentry.c (+9, -0) (Diff)
/source/gameengine/Converter/KX_BlenderSceneConverter.cpp (+17, -3) (Diff)
/source/gameengine/Converter/KX_BlenderSceneConverter.h (+3, -1) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+18, -3) (Diff)
/source/gameengine/PyDoc/bge.logic.rst (+4, -2) (Diff)
/source/blender/blenloader/intern/readblenentry.c (+9, -0) (Diff)
/source/gameengine/Converter/KX_BlenderSceneConverter.cpp (+17, -3) (Diff)
/source/gameengine/Converter/KX_BlenderSceneConverter.h (+3, -1) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+18, -3) (Diff)
/source/gameengine/PyDoc/bge.logic.rst (+4, -2) (Diff)