From b4e4ccf92ddc8a7d4ed3da13c589b2f7c44baa0d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 5 Apr 2009 19:37:13 +0000 Subject: BGE PyAPI can now import text (within the blend-file) Previously this only worked with the Blender API. - bpy_internal_import small C file that Blender scripting and the game engine use. - Tested with blender, blenderplayer, loading files - Needed to use a hack to override the Main struct since the game engine doesn't set G.main - when the sandbox is set, only internal scripts can be imported. --- source/gameengine/Ketsji/SConscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/gameengine/Ketsji/SConscript') diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index 5989d9d8b52..68e5c62ab6c 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -18,7 +18,11 @@ sources.extend([\ '#source/blender/python/api2_2x/vector.c',\ ]) -incs = '. #source/blender/python/api2_2x' # Only for Mathutils! - no other deps +sources.extend([\ + '#source/blender/python/api2_2x/bpy_internal_import.c' +]) + +incs = '. #source/blender/python/api2_2x' # Only for Mathutils! and bpy_internal_import.h, be very careful incs += ' #source/kernel/gen_system #intern/string #intern/guardedalloc' incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer #intern/bmfont' -- cgit v1.2.3