Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-07-23 02:58:12 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-07-23 02:58:12 +0400
commit7fb85e1fb7a9ceb53b4477402a8536ae07cdc950 (patch)
treed837ca824a300773ea4a57377152bef2a756ef5c /source/gameengine/Converter/KX_BlenderSceneConverter.cpp
parentdf3f3dff3b5c4261b9541998029c248ead5efb2f (diff)
BGE LibLoad: Allow the user to disable loading text datablocks if they want to attempt to increase security by not loading potential Python scripts.
Diffstat (limited to 'source/gameengine/Converter/KX_BlenderSceneConverter.cpp')
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 3961e6554a7..651c1a70f45 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -988,8 +988,7 @@ bool KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openlib, const cha
load_datablocks(main_newlib, bpy_openlib, path, idcode);
- if (idcode==ID_SCE) {
- /* assume we want text blocks too */
+ if (idcode==ID_SCE && options & LIB_LOAD_LOAD_SCRIPTS) {
load_datablocks(main_newlib, bpy_openlib, path, ID_TXT);
}
@@ -1045,8 +1044,8 @@ bool KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openlib, const cha
}
/* Handle any text datablocks */
-
- addImportMain(main_newlib);
+ if (options & LIB_LOAD_LOAD_SCRIPTS)
+ addImportMain(main_newlib);
/* Now handle all the actions */
if (options & LIB_LOAD_LOAD_ACTIONS) {