diff options
Diffstat (limited to 'source/blender/python/intern/bpy_util.c')
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index 31d15d8a69e..8bdb6334a91 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -162,6 +162,16 @@ void PyObSpit(char *name, PyObject *var) { fprintf(stderr, "\n"); } +void PyLineSpit(void) { + char filename[512]; + int lineno; + + PyErr_Clear(); + BPY_getFileAndNum(&filename, &lineno); + + fprintf(stderr, "%s:%d\n", filename, lineno); +} + void BPY_getFileAndNum(char **filename, int *lineno) { PyObject *getframe, *frame; |