diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-09 21:12:39 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-09 21:12:39 +0400 |
commit | b5553f006fbb75e57c052c4a04b1a4e4358ea7ba (patch) | |
tree | e01f8faf9fc82574158f7954e903b5eccbb51e3d /source/blender/editors/space_buttons | |
parent | cf503f5c77f0c78234db5335b0e44f7904ca5f3a (diff) |
Fix #30505: bpy.context.copy() gives error running in the properties editor
with cycles as render engine.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 9c47c407bd9..2da70468f0c 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -680,9 +680,9 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts) /************************* Context Callback ************************/ const char *buttons_context_dir[] = { - "world", "object", "mesh", "armature", "lattice", "curve", + "texture_slot", "world", "object", "mesh", "armature", "lattice", "curve", "meta_ball", "lamp", "speaker", "camera", "material", "material_slot", - "texture", "texture_slot", "texture_user", "bone", "edit_bone", + "texture", "texture_user", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable", "particle_settings", "cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint", NULL }; @@ -697,7 +697,12 @@ 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)) { - CTX_data_dir_set(result, buttons_context_dir); + /* in case of new shading system we skip texture_slot, complex python + * UI script logic depends on checking if this is available */ + if (sbuts->texuser) + CTX_data_dir_set(result, buttons_context_dir + 1); + else + CTX_data_dir_set(result, buttons_context_dir); return 1; } else if (CTX_data_equals(member, "world")) { |