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:
-rw-r--r--source/blender/python/BPY_extern.h2
-rw-r--r--source/blender/python/intern/bpy_interface.c6
-rw-r--r--source/blender/python/intern/bpy_rna.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 323682b99aa..98e160525f8 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -100,7 +100,7 @@ extern "C" {
int BPY_run_python_script( struct bContext *C, const char *filename, struct Text *text, struct ReportList *reports ); // 2.5 working
int BPY_run_script_space_draw(const struct bContext *C, struct SpaceScript * sc); // 2.5 working
// int BPY_run_script_space_listener(struct bContext *C, struct SpaceScript * sc, struct ARegion *ar, struct wmNotifier *wmn); // 2.5 working
- void BPY_update_modules( void ); // XXX - annoying, need this for pointers that get out of date
+ void BPY_update_modules(struct bContext *C); // XXX - annoying, need this for pointers that get out of date
//
int BPY_context_get(struct bContext *C, const char *member, struct bContextDataResult *result);
//
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 3a049e89031..7b31f77a0c9 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -88,7 +88,7 @@ void bpy_context_set(bContext *C, PyGILState_STATE *gilstate)
fprintf(stderr, "ERROR: Python context called with a NULL Context. this should not happen!\n");
}
- BPY_update_modules(); /* can give really bad results if this isnt here */
+ BPY_update_modules(C); /* can give really bad results if this isnt here */
#ifdef TIME_PY_RUN
if(bpy_timer_count==0) {
@@ -136,7 +136,7 @@ void BPY_free_compiled_text( struct Text *text )
}
}
-void BPY_update_modules( void )
+void BPY_update_modules(bContext *C)
{
#if 0 // slow, this runs all the time poll, draw etc 100's of time a sec.
PyObject *mod= PyImport_ImportModuleLevel("bpy", NULL, NULL, NULL, 0);
@@ -146,7 +146,7 @@ void BPY_update_modules( void )
/* refreshes the main struct */
BPY_update_rna_module();
- bpy_context_module->ptr.data= (void *)BPy_GetContext();
+ bpy_context_module->ptr.data= (void *)C;
}
/* must be called before Py_Initialize */
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index b95dc520526..ee393c5fe15 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -5122,7 +5122,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun
return 0;
}
-extern void BPY_update_modules( void ); //XXX temp solution
+extern void BPY_update_modules(bContext *C); //XXX temp solution
/* TODO - multiple return values like with rna functions */
static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)