== 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
This commit is contained in:
2010-07-26 04:00:09 +00:00
parent 6561da03ae
commit ec19c7dffc
7 changed files with 151 additions and 210 deletions

View File

@@ -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);