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>2011-02-15 17:38:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-15 17:38:43 +0300
commit86cf6b40162b683a209cef499fd5beb2d69cc6e1 (patch)
treeb9d115434046ea6aebd9b2743b1bc1298533c93e /source/blender/editors/space_buttons
parentefb21625bf690e97cc1d38096bb7f4bf9b85f2fc (diff)
moving dir strings into global namespace for doc access (coming up)
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c14
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index ee8b67a146a..fe49c20c040 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -617,6 +617,12 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
/************************* Context Callback ************************/
+const char *buttons_context_dir[] = {
+ "world", "object", "mesh", "armature", "lattice", "curve",
+ "meta_ball", "lamp", "camera", "material", "material_slot",
+ "texture", "texture_slot", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable",
+ "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL};
+
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
{
SpaceButs *sbuts= CTX_wm_space_buts(C);
@@ -627,13 +633,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
/* here we handle context, getting data from precomputed path */
if(CTX_data_dir(member)) {
- static const char *dir[] = {
- "world", "object", "mesh", "armature", "lattice", "curve",
- "meta_ball", "lamp", "camera", "material", "material_slot",
- "texture", "texture_slot", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable",
- "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL};
-
- CTX_data_dir_set(result, dir);
+ CTX_data_dir_set(result, buttons_context_dir);
return 1;
}
else if(CTX_data_equals(member, "world")) {
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index 9478168f35a..407454d4347 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -65,6 +65,8 @@ void buttons_context_draw(const struct bContext *C, struct uiLayout *layout);
void buttons_context_register(struct ARegionType *art);
struct ID *buttons_context_id_path(const struct bContext *C);
+extern const char *buttons_context_dir[]; /* doc access */
+
/* buttons_ops.c */
void BUTTONS_OT_file_browse(struct wmOperatorType *ot);
void BUTTONS_OT_toolbox(struct wmOperatorType *ot);