diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-07 14:23:24 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-07 14:23:24 +0400 |
commit | 95b25e7333c4ac9077812b06cfa203ffcbab26a5 (patch) | |
tree | 26216e5faaa16e006b59d261fe8576c177487864 /source/blender | |
parent | 8714ae09f89426242ecd0c65f3291de1a2b51fc4 (diff) |
Fix T39562: Properties panel Pinning is broken
'scene' was simply not handled in button context.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index eeb1f4b9e4f..9dc62421349 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -873,7 +873,7 @@ Scene *CTX_data_scene(const bContext *C) { Scene *scene; - if (ctx_data_pointer_verify(C, "scene", (void *)&scene)) + if (ctx_data_pointer_verify(C, "scene", (void *)&scene) && scene) return scene; else return C->data.scene; diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index a14ed728b1d..f71ffd8c3f6 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -656,7 +656,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts) /************************* Context Callback ************************/ const char *buttons_context_dir[] = { - "texture_slot", "world", "object", "mesh", "armature", "lattice", "curve", + "texture_slot", "scene", "world", "object", "mesh", "armature", "lattice", "curve", "meta_ball", "lamp", "speaker", "camera", "material", "material_slot", "texture", "texture_user", "texture_user_property", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable", "particle_settings", @@ -681,6 +681,10 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r CTX_data_dir_set(result, buttons_context_dir); return 1; } + else if (CTX_data_equals(member, "scene")) { + set_pointer_type(path, result, &RNA_Scene); + return 1; + } else if (CTX_data_equals(member, "world")) { set_pointer_type(path, result, &RNA_World); return 1; |