diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-05 12:40:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-05 12:40:07 +0400 |
commit | e5647ea196c360905d8f0e1c1b2fad1745cb5cf5 (patch) | |
tree | 9e678297cd75aad51a57b5555c0caf750fed4cb7 /source/blender/python/intern | |
parent | 2b939904ab4b6af614879ada711ac47be01cbf83 (diff) |
py operators - don't use the screen as an operators ID anymore, screen's don't store operator instances and operator functions have access to the context if they need the current screen.
also add some more py api file descriptions.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_library.c | 11 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 1 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index 98b4786607f..12fb5ed43b4 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -23,7 +23,7 @@ /** \file blender/python/intern/bpy_driver.c * \ingroup pythonintern * - * This file defines the 'BPY_driver_exec' to execute python drivers, + * This file defines the 'BPY_driver_exec' to execute python driver expressions, * called by the animation system, there are also some utility functions * to deal with the namespace used for driver execution. */ diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c index 54398f75a1d..b91948cc0b8 100644 --- a/source/blender/python/intern/bpy_library.c +++ b/source/blender/python/intern/bpy_library.c @@ -27,7 +27,8 @@ * this would be done via RNA api but in this case a hand written python api * allows us to use pythons context manager (__enter__ and __exit__). * - * Everything here is exposed via bpy.data.libraries.load(...) context manager. + * Everything here is exposed via bpy.data.libraries.load(...) which returns + * a context manager. */ /* nifty feature. swap out strings for RNA data */ @@ -77,8 +78,8 @@ static PyObject *bpy_lib_dir(BPy_Library *self); static PyMethodDef bpy_lib_methods[]= { {"__enter__", (PyCFunction)bpy_lib_enter, METH_NOARGS}, - {"__exit__", (PyCFunction)bpy_lib_exit, METH_VARARGS}, - {"__dir__", (PyCFunction)bpy_lib_dir, METH_NOARGS}, + {"__exit__", (PyCFunction)bpy_lib_exit, METH_VARARGS}, + {"__dir__", (PyCFunction)bpy_lib_dir, METH_NOARGS}, {NULL} /* sentinel */ }; @@ -289,7 +290,7 @@ static void bpy_lib_exit_warn_idname(BPy_Library *self, const char *name_plural, PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); if (PyErr_WarnFormat(PyExc_UserWarning, 1, - "load: '%s' does not contain %s[\"%s\"]", + "load: '%s' does not contain %s[\"%s\"]", self->abspath, name_plural, idname)) { /* Spurious errors can appear at shutdown */ if (PyErr_ExceptionMatches(PyExc_Warning)) { @@ -304,7 +305,7 @@ static void bpy_lib_exit_warn_type(BPy_Library *self, PyObject *item) PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); if (PyErr_WarnFormat(PyExc_UserWarning, 1, - "load: '%s' expected a string type, not a %.200s", + "load: '%s' expected a string type, not a %.200s", self->abspath, Py_TYPE(item)->tp_name)) { /* Spurious errors can appear at shutdown */ if (PyErr_ExceptionMatches(PyExc_Warning)) { diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index 43ca4da7ae2..fb42f7d59e0 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -27,7 +27,6 @@ * use (unrelated to 'bpy.utils') */ - #include <Python.h> #include "bpy_util.h" |