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:
authorCampbell Barton <ideasman42@gmail.com>2013-09-02 23:28:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-02 23:28:44 +0400
commitc0ca93c9b26cf3f248ba11d86ef47e9e0ca5e84d (patch)
tree5b27e7689b7e6e1782c454d5bdb42e5619b08235 /source/blender/python/intern/bpy_interface.c
parent37bad42b9ddb22b923287ca0f09388d2355b2c65 (diff)
Add poll message when poll fails because of window missing from the context.
This means calling invoke operators from python in states that dont support will give a meaningful error message. also reduce context lookups when polling.
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c8
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 feffea20553..dc1f5828c15 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -821,8 +821,12 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
}
if (done == false) {
- if (item) printf("PyContext '%s' not a valid type\n", member);
- else printf("PyContext '%s' not found\n", member);
+ if (item) {
+ printf("PyContext '%s' not a valid type\n", member);
+ }
+ else {
+ printf("PyContext '%s' not found\n", member);
+ }
}
else {
if (G.debug & G_DEBUG_PYTHON) {