diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 5b93f9ee06d..d94d2be3a94 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2070,6 +2070,10 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr uiDefIconButR(block, TOG, 0, ICON_SCENE, 0, 0, UI_UNIT_X, UI_UNIT_Y, &itemptr, "active_render", 0, 0, 0, 0, 0, NULL); uiBlockSetEmboss(block, UI_EMBOSS); } + else if (itemptr.type == &RNA_MaterialTextureSlot) { + uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, ptr, "use_textures", i, 0, 0, 0, 0, NULL); + } + /* XXX - end hardcoded cruft */ if(name) MEM_freeN(name); diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 28fcc3103b8..b22b5916362 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1730,6 +1730,13 @@ void RNA_def_material(BlenderRNA *brna) rna_def_mtex_common(srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get", "rna_Material_active_texture_set", "MaterialTextureSlot", "rna_Material_update"); + /* only material has this one */ + prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "septex", 1); + RNA_def_property_array(prop, 18); + RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture."); + RNA_def_property_update(prop, 0, "rna_Material_update"); + rna_def_material_colors(srna); rna_def_material_diffuse(srna); rna_def_material_specularity(srna);