Fix [#29502] Brush texture Preview panel doesnt show Alpha checkbox
authorThomas Dinges <blender@dingto.org>
Sun, 4 Dec 2011 16:55:46 +0000 (16:55 +0000)
committerThomas Dinges <blender@dingto.org>
Sun, 4 Dec 2011 16:55:46 +0000 (16:55 +0000)
* Added to the py UI file, it would require some deeper changes to have it in the c Template, can be done later.
* Fixed a typo.

release/scripts/startup/bl_ui/properties_texture.py
source/blender/editors/interface/interface_templates.c

index 9f67edd76532f58c2f221d3f069e8fc256e229be..d16b2f15f524cead811b46928601f1eeb51a8bbe 100644 (file)
@@ -166,6 +166,10 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
             layout.template_preview(tex, parent=idblock, slot=slot)
         else:
             layout.template_preview(tex, slot=slot)
+            
+        #Show Alpha Button for Brush Textures, see #29502
+        if context.space_data.texture_context == 'BRUSH':
+            layout.prop(tex, "use_preview_alpha")
 
 
 class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
index eb7e06623f7cfa726b1d6b9fbcd461d8845dfb4a..7f01d4f031da5683f6be81c5679b08990e84c75b 100644 (file)
@@ -1223,7 +1223,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
                                uiDefButS(block, ROW, B_MATPRV, IFACE_("World"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
                        uiDefButS(block, ROW, B_MATPRV, IFACE_("Both"),  0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
                        
-                       /* Alpha buton for texture preview */
+                       /* Alpha button for texture preview */
                        if(*pr_texture!=TEX_PR_OTHER) {
                                row = uiLayoutRow(layout, 0);
                                uiItemR(row, &texture_ptr, "use_preview_alpha", 0, NULL, ICON_NONE);