diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-10-08 19:29:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-10-08 19:29:43 +0400 |
commit | 66634e2be41be8530bec49b3bab27dfa4ea176d3 (patch) | |
tree | 7cb16000a525e67bf19c6aba6ccb2d3ae113a885 /source/blender | |
parent | 88613b9184c2df08a2de58263b8f8e948543a0a1 (diff) |
toggle buttons for texture channels (hardcoded like UV layer buttons)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 7 |
2 files changed, 11 insertions, 0 deletions
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); |