diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-02 12:05:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-02 14:13:57 +0300 |
commit | 017c731cf38b01e6ffd2d57932c3a268678e51eb (patch) | |
tree | 0536e9d5f911c23828de6179d1f3bf0d5cd76789 /source/blender/python/intern/bpy_rna_array.c | |
parent | 21fcc723e98b81f77c46edb18c5092d8878c6ccb (diff) |
Logging: use for Python API
Adds categories "bpy.context" & "bpy.rna"
Diffstat (limited to 'source/blender/python/intern/bpy_rna_array.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_array.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index e0ca3634261..ed9d1e9c0e5 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -28,6 +28,8 @@ #include <Python.h> +#include "CLG_log.h" + #include "BLI_utildefines.h" #include "RNA_types.h" @@ -39,6 +41,8 @@ #include "RNA_access.h" +#include "BPY_extern_clog.h" + #include "../generic/py_capi_utils.h" #define USE_MATHUTILS @@ -785,8 +789,7 @@ PyObject *pyrna_py_from_array_index(BPy_PropertyArrayRNA *self, PointerRNA *ptr, len = RNA_property_multi_array_length(ptr, prop, arraydim); if (index >= len || index < 0) { /* this shouldn't happen because higher level funcs must check for invalid index */ - if (G.debug & G_DEBUG_PYTHON) - printf("%s: invalid index %d for array with length=%d\n", __func__, index, len); + CLOG_WARN(BPY_LOG_RNA, "invalid index %d for array with length=%d", index, len); PyErr_SetString(PyExc_IndexError, "out of range"); return NULL; |