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:
authorCampbell Barton <ideasman42@gmail.com>2009-04-29 16:43:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-29 16:43:09 +0400
commitf8656d35101317a2b4a00eaf33f6d91d2d28dd7a (patch)
tree8819e7f5919144b1fb514901c08dfc45e2967079 /source/blender/makesdna/DNA_controller_types.h
parent988fbb88dc621d8f41d1b07a729ae5afc24efdaa (diff)
BGE alternative run mode for python controllers.
Option to run a function in a module rather then a script from a python controller, this has a number of advantages. - No allocating and freeing the namespace dictionary for every time its triggered (hard to measure the overhead here, but in a test with calling 42240 scripts a second each defining 200 vars, using modules was ~25% faster) - Ability to use external python scripts for game logic. - Convenient debug option that lets you edit scripts while the game engine runs.
Diffstat (limited to 'source/blender/makesdna/DNA_controller_types.h')
-rw-r--r--source/blender/makesdna/DNA_controller_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h
index 376f95b0145..b3c82e746c1 100644
--- a/source/blender/makesdna/DNA_controller_types.h
+++ b/source/blender/makesdna/DNA_controller_types.h
@@ -43,6 +43,9 @@ typedef struct bExpressionCont {
typedef struct bPythonCont {
struct Text *text;
+ char module[64];
+ int mode;
+ int flag; /* only used for debug now */
} bPythonCont;
typedef struct bController {
@@ -77,5 +80,8 @@ typedef struct bController {
#define CONT_NEW 4
#define CONT_MASK 8
+/* pyctrl->flag */
+#define CONT_PY_DEBUG 1
+
#endif