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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-04 08:27:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-04 08:27:46 +0400
commit87cd81b162912e16297eab39d58341aa99125c52 (patch)
tree1a9b9f7ee143af47bba94368c17c5c05e8de160a /source
parent7e9bc22925f3669248bf211f4f3049471cf23b2b (diff)
- added docs and examples for bpy.app.handlers
- correct error in own last commit for BKE_screen_find_big_area()
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/screen.c2
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c24
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp2
3 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index b7f49bbab47..3d28e45f6b7 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -361,7 +361,7 @@ struct ScrArea *BKE_screen_find_big_area(struct bScreen *sc, const int spacetype
for(sa= sc->areabase.first; sa; sa= sa->next) {
if ((spacetype == -1) || sa->spacetype == spacetype) {
- if (min >= sa->winx && min >= sa->winy) {
+ if (min <= sa->winx && min <= sa->winy) {
size= sa->winx*sa->winy;
if (size > maxsize) {
maxsize= size;
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 5b8c20bb12d..f130a4bcc5c 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -38,21 +38,21 @@ void bpy_app_generic_callback(struct Main *main, struct ID *id, void *arg);
static PyTypeObject BlenderAppCbType;
static PyStructSequence_Field app_cb_info_fields[]= {
- {(char *)"frame_change_pre", NULL},
- {(char *)"frame_change_post", NULL},
- {(char *)"render_pre", NULL},
- {(char *)"render_post", NULL},
- {(char *)"render_stats", NULL},
- {(char *)"load_pre", NULL},
- {(char *)"load_post", NULL},
- {(char *)"save_pre", NULL},
- {(char *)"save_post", NULL},
- {(char *)"scene_update_pre", NULL},
- {(char *)"scene_update_post", NULL},
+ {(char *)"frame_change_pre", (char *)"Callback list - on frame change for playback and rendering (before)"},
+ {(char *)"frame_change_post", (char *)"Callback list - on frame change for playback and rendering (after)"},
+ {(char *)"render_pre", (char *)"Callback list - on render (before)"},
+ {(char *)"render_post", (char *)"Callback list - on render (after)"},
+ {(char *)"render_stats", (char *)"Callback list - on printing render statistics"},
+ {(char *)"load_pre", (char *)"Callback list - on loading a new blend file (before)"},
+ {(char *)"load_post", (char *)"Callback list - on loading a new blend file (after)"},
+ {(char *)"save_pre", (char *)"Callback list - on saving a blend file (before)"},
+ {(char *)"save_post", (char *)"Callback list - on saving a blend file (after)"},
+ {(char *)"scene_update_pre", (char *)"Callback list - on updating the scenes data (before)"},
+ {(char *)"scene_update_post", (char *)"Callback list - on updating the scenes data (after)"},
/* sets the permanent tag */
# define APP_CB_OTHER_FIELDS 1
- {(char *)"persistent", NULL},
+ {(char *)"persistent", (char *)"Function decorator for callback functions not to be removed when loading new files"},
{NULL}
};
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index c3a141e7405..02e6ebea71b 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -815,7 +815,7 @@ static struct PyMethodDef game_methods[] = {
{"getAverageFrameRate", (PyCFunction) gPyGetAverageFrameRate, METH_NOARGS, (const char *)"Gets the estimated average frame rate"},
{"getBlendFileList", (PyCFunction)gPyGetBlendFileList, METH_VARARGS, (const char *)"Gets a list of blend files in the same directory as the current blend file"},
{"PrintGLInfo", (PyCFunction)pyPrintExt, METH_NOARGS, (const char *)"Prints GL Extension Info"},
- {"PrintMemInfo", (PyCFunction)pyPrintStats, METH_NOARGS, (const char *)"Print engine stastics"},
+ {"PrintMemInfo", (PyCFunction)pyPrintStats, METH_NOARGS, (const char *)"Print engine statistics"},
/* library functions */
{"LibLoad", (PyCFunction)gLibLoad, METH_VARARGS|METH_KEYWORDS, (const char *)""},