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>2011-10-13 05:29:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-13 05:29:08 +0400
commit276e5f709518e0a64c7bf520062de9ed9337572f (patch)
tree6da5f0feebe6cb810a47aa1ec4683d4cb34ca822 /source/blender/python/intern/bpy_app_handlers.c
parent6955c47faca1c772c9278136d53337c2083aea18 (diff)
formatting edits & remove debug print.
Diffstat (limited to 'source/blender/python/intern/bpy_app_handlers.c')
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index cd3d78410f2..1a50ae79dc7 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -77,13 +77,13 @@ static PyObject *make_app_cb_info(void)
return NULL;
}
- for(pos= 0; pos < BLI_CB_EVT_TOT; pos++) {
- if(app_cb_info_fields[pos].name == NULL) {
+ for (pos= 0; pos < BLI_CB_EVT_TOT; pos++) {
+ if (app_cb_info_fields[pos].name == NULL) {
Py_FatalError("invalid callback slots 1");
}
PyStructSequence_SET_ITEM(app_cb_info, pos, (py_cb_array[pos]= PyList_New(0)));
}
- if(app_cb_info_fields[pos].name != NULL) {
+ if (app_cb_info_fields[pos].name != NULL) {
Py_FatalError("invalid callback slots 2");
}
@@ -103,12 +103,12 @@ PyObject *BPY_app_handlers_struct(void)
BlenderAppCbType.tp_new= NULL;
/* assign the C callbacks */
- if(ret) {
+ if (ret) {
static bCallbackFuncStore funcstore_array[BLI_CB_EVT_TOT]= {{NULL}};
bCallbackFuncStore *funcstore;
int pos= 0;
- for(pos= 0; pos < BLI_CB_EVT_TOT; pos++) {
+ for (pos= 0; pos < BLI_CB_EVT_TOT; pos++) {
funcstore= &funcstore_array[pos];
funcstore->func= bpy_app_generic_callback;
funcstore->alloc= 0;
@@ -124,7 +124,7 @@ void BPY_app_handlers_reset(void)
{
int pos= 0;
- for(pos= 0; pos < BLI_CB_EVT_TOT; pos++) {
+ for (pos= 0; pos < BLI_CB_EVT_TOT; pos++) {
PyList_SetSlice(py_cb_array[pos], 0, PY_SSIZE_T_MAX, NULL);
}
}
@@ -134,7 +134,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *ar
{
PyObject *cb_list= py_cb_array[GET_INT_FROM_POINTER(arg)];
Py_ssize_t cb_list_len;
- if((cb_list_len= PyList_GET_SIZE(cb_list)) > 0) {
+ if ((cb_list_len= PyList_GET_SIZE(cb_list)) > 0) {
PyGILState_STATE gilstate= PyGILState_Ensure();
PyObject* args= PyTuple_New(1); // save python creating each call
@@ -143,7 +143,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *ar
Py_ssize_t pos;
/* setup arguments */
- if(id) {
+ if (id) {
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
PyTuple_SET_ITEM(args, 0, pyrna_struct_CreatePyObject(&id_ptr));