diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-20 18:55:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-20 18:55:28 +0400 |
commit | ad07fc19c0fb97540bfe8d259c0b39098b9d7b9b (patch) | |
tree | b65d7c340dc32cd6e7988bea3266962176568d9b /source/blender/editors/space_text | |
parent | 980dab90282ab3ca63ac44b174344a6607934fb9 (diff) |
Context
Python dir(context) now gives the items from the data context
too, modified context callbacks to also return a list of items
in the context.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index d3c3b78cc50..8759fd00f74 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -293,7 +293,12 @@ static int text_context(const bContext *C, const char *member, bContextDataResul { SpaceText *st= CTX_wm_space_text(C); - if(CTX_data_equals(member, "edit_text")) { + if(CTX_data_dir(member)) { + static const char *dir[] = {"edit_text", NULL}; + CTX_data_dir_set(result, dir); + return 1; + } + else if(CTX_data_equals(member, "edit_text")) { CTX_data_id_pointer_set(result, &st->text->id); return 1; } |