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/screen/screen_context.c | |
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/screen/screen_context.c')
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 11d1d019005..1ea6f8baceb 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -42,7 +42,15 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult Scene *scene= sc->scene; Base *base; - if(CTX_data_equals(member, "scene")) { + if(CTX_data_dir(member)) { + static const char *dir[] = { + "scene", "selected_objects", "selected_bases", "active_base", + "active_object", "edit_object", NULL}; + + CTX_data_dir_set(result, dir); + return 1; + } + else if(CTX_data_equals(member, "scene")) { CTX_data_id_pointer_set(result, &scene->id); return 1; } |