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.
This commit is contained in:
2013-09-02 19:28:44 +00:00
parent 37bad42b9d
commit c0ca93c9b2
2 changed files with 19 additions and 9 deletions

View File

@@ -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) {