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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-18 14:56:26 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-18 14:56:26 +0400
commit178ba76b09fc923213a26257bbd5b82d0ad26bf0 (patch)
tree61b594404c29b920eeb25499180c2079f68d436a /source/blender/python/intern
parent304ce06a5a026041fb0d0410c6a4600e995e1534 (diff)
RNA: pass Main rather than Context to register/unregister callbacks.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_rna.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 8af0db6ee13..917015b905b 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -6418,7 +6418,7 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class
identifier= ((PyTypeObject*)py_class)->tp_name;
- srna_new= reg(C, &reports, py_class, identifier, bpy_class_validate, bpy_class_call, bpy_class_free);
+ srna_new= reg(CTX_data_main(C), &reports, py_class, identifier, bpy_class_validate, bpy_class_call, bpy_class_free);
if(BPy_reports_to_error(&reports, PyExc_RuntimeError, TRUE) == -1)
return NULL;
@@ -6568,7 +6568,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla
C= BPy_GetContext();
/* call unregister */
- unreg(C, srna); /* calls bpy_class_free, this decref's py_class */
+ unreg(CTX_data_main(C), srna); /* calls bpy_class_free, this decref's py_class */
PyDict_DelItemString(((PyTypeObject *)py_class)->tp_dict, "bl_rna");
if(PyErr_Occurred())