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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-20 18:55:28 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-20 18:55:28 +0400
commitad07fc19c0fb97540bfe8d259c0b39098b9d7b9b (patch)
treeb65d7c340dc32cd6e7988bea3266962176568d9b /source/blender/editors/space_buttons
parent980dab90282ab3ca63ac44b174344a6607934fb9 (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_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index fc280d9b551..d97b4acdb96 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -492,8 +492,17 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 0;
/* here we handle context, getting data from precomputed path */
-
- if(CTX_data_equals(member, "world")) {
+ if(CTX_data_dir(member)) {
+ static const char *dir[] = {
+ "world", "object", "meshe", "armature", "lattice", "curve",
+ "meta_ball", "lamp", "camera", "material", "material_slot",
+ "texture", "texture_slot", "bone", "edit_bone", "particle_system",
+ "cloth", "soft_body", "fluid", NULL};
+
+ CTX_data_dir_set(result, dir);
+ return 1;
+ }
+ else if(CTX_data_equals(member, "world")) {
set_pointer_type(path, result, &RNA_World);
return 1;
}