diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-11-10 22:57:04 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-11-10 22:57:04 +0300 |
commit | 0797054c2d2744007d5f88662a89bc8937fc20bb (patch) | |
tree | 6d3aca589dc2c67fe7c11dda5e950f63de1d4e6d /source/blender | |
parent | e29a70e136cbe80b11134d0e6f7a4a022c312e81 (diff) |
Running with -d, python context also prints members asked from context that are present.
Also, error messages were mixed up, wrong type and not present where inversed.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 200e5e52f05..27aa2744bfa 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -64,6 +64,7 @@ #include "BKE_fcurve.h" #include "BKE_text.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BPY_extern.h" @@ -1019,8 +1020,11 @@ int BPY_context_get(bContext *C, const char *member, bContextDataResult *result) } if(done==0) { - if (item) printf("Context '%s' not found\n", member); - else printf("Context '%s' not a valid type\n", member); + if (item) printf("Context '%s' not a valid type\n", member); + else printf("Context '%s' not found\n", member); + } + else if (G.f & G_DEBUG) { + printf("Context '%s' found\n", member); } return done; |