Fix #30505: bpy.context.copy() gives error running in the properties editor

with cycles as render engine.
This commit is contained in:
Brecht Van Lommel
2012-11-09 17:12:39 +00:00
parent cf503f5c77
commit b5553f006f

View File

@@ -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")) {