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:
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index cfaa7bf91bd..dd943e7988d 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -144,7 +144,7 @@ static int buttons_context_path_world(ButsContextPath *path)
else if (buttons_context_path_scene(path)) {
scene = path->ptr[path->len - 1].data;
world = scene->world;
-
+
if (world) {
RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]);
path->len++;
@@ -421,7 +421,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
if (!ct->user)
return 0;
-
+
id = ct->user->id;
if (id) {
@@ -489,7 +489,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
}
/* No pinned root, use scene as initial root. */
else {
- if (mainb == BCONTEXT_WORKSPACE) {
+ if (ELEM(mainb, BCONTEXT_WORKSPACE, BCONTEXT_TOOL)) {
RNA_id_pointer_create(&workspace->id, &path->ptr[0]);
path->len++;
}
@@ -525,6 +525,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
case BCONTEXT_WORLD:
found = buttons_context_path_world(path);
break;
+ case BCONTEXT_TOOL:
case BCONTEXT_WORKSPACE:
found = buttons_context_path_workspace(path);
break;
@@ -572,7 +573,7 @@ static int buttons_shading_context(const bContext *C, int mainb)
return 1;
if (mainb == BCONTEXT_DATA && ob && ELEM(ob->type, OB_LAMP, OB_CAMERA))
return 1;
-
+
return 0;
}
@@ -586,7 +587,7 @@ static int buttons_shading_new_context(const bContext *C, int flag)
return BCONTEXT_DATA;
else if (flag & (1 << BCONTEXT_WORLD))
return BCONTEXT_WORLD;
-
+
return BCONTEXT_RENDER;
}
@@ -858,7 +859,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
else if (CTX_data_equals(member, "particle_settings")) {
/* only available when pinned */
PointerRNA *ptr = get_pointer_type(path, &RNA_ParticleSettings);
-
+
if (ptr && ptr->data) {
CTX_data_pointer_set(result, ptr->id.data, &RNA_ParticleSettings, ptr->data);
return 1;
@@ -866,7 +867,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
else {
/* get settings from active particle system instead */
ptr = get_pointer_type(path, &RNA_ParticleSystem);
-
+
if (ptr && ptr->data) {
ParticleSettings *part = ((ParticleSystem *)ptr->data)->part;
CTX_data_pointer_set(result, ptr->id.data, &RNA_ParticleSettings, part);
@@ -906,7 +907,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
}
-
+
else if (CTX_data_equals(member, "smoke")) {
PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
@@ -963,7 +964,7 @@ static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
}
else
sbuts->pinid = NULL;
-
+
ED_area_tag_redraw(CTX_wm_area(C));
}