diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-07-26 08:00:09 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-07-26 08:00:09 +0400 |
commit | ec19c7dffca92119c964dc18ef3af6efd1d8c0c9 (patch) | |
tree | 549f8b92d3badebd2a0e25710a86b639df9502c5 /source/blender/editors/interface/interface_widgets.c | |
parent | 6561da03ae1f0bd90b257c096f38c8432f413076 (diff) |
== Sculpt ==
Fixed brush icons loading slowly
* Changed brush icon property from an enum to a flag that toggles whether a custom file is used for the brush icon
* Changed get_brush_icon to only handle loading external icons, built-ins are handled through the regular icon system
* Modified preview icon drawing to allow built-in icons
* When not using a custom icon, a default icon is selected based on the current tool
TODO:
* Allowing preview to show built-in icons makes the brush texture selector look ugly when nothing is selected. As discussed on IRC though, the nothing-selected state needs to be clarified anyway; I'll address this in another commit
* Use image browser when selecting a custom icon
* Selecting the default icon is ugly (uses the active object's mode), this can be fixed by making brushes know which paint mode they are part of
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d2860adbf50..b457bf42ed1 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -747,11 +747,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) static void widget_draw_preview(BIFIconID icon, float aspect, float alpha, rcti *rect) { int w, h, x, y, size; - - /* only display previews for actual preview images .. ? */ - if (icon < BIFICONID_LAST) - return; - + w = rect->xmax - rect->xmin; h = rect->ymax - rect->ymin; size = MIN2(w, h); |