Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2010-07-26 08:00:09 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2010-07-26 08:00:09 +0400
commitec19c7dffca92119c964dc18ef3af6efd1d8c0c9 (patch)
tree549f8b92d3badebd2a0e25710a86b639df9502c5 /source/blender/makesdna/DNA_brush_types.h
parent6561da03ae1f0bd90b257c096f38c8432f413076 (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/makesdna/DNA_brush_types.h')
-rw-r--r--source/blender/makesdna/DNA_brush_types.h38
1 files changed, 1 insertions, 37 deletions
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 4a174d6471a..dc7d105a8de 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -55,8 +55,6 @@ typedef struct Brush {
struct MTex mtex;
struct ImBuf *icon_imbuf;
- char icon;
- char pad2[7];
PreviewImage *preview;
char icon_filepath[240];
@@ -126,6 +124,7 @@ typedef struct Brush {
#define BRUSH_RANDOM_ROTATION (1<<25)
#define BRUSH_PLANE_TRIM (1<<26)
#define BRUSH_FRONTFACE (1<<27)
+#define BRUSH_CUSTOM_ICON (1<<28)
/* Brush.sculpt_tool */
#define SCULPT_TOOL_DRAW 1
@@ -147,41 +146,6 @@ typedef struct Brush {
#define SCULPT_TOOL_BLOB 17
#define SCULPT_TOOL_CLAY_TUBES 18
-/* Internal Icons */
-#define BRUSH_ICON_FILE 0
-
-#define BRUSH_ICON_BLOB 1
-#define BRUSH_ICON_CLAY 2
-#define BRUSH_ICON_CREASE 3
-#define BRUSH_ICON_SCULPTDRAW 4
-#define BRUSH_ICON_FILL 5
-#define BRUSH_ICON_FLATTEN 6
-#define BRUSH_ICON_GRAB 7
-#define BRUSH_ICON_INFLATE 8
-#define BRUSH_ICON_LAYER 9
-#define BRUSH_ICON_NUDGE 10
-#define BRUSH_ICON_PINCH 11
-#define BRUSH_ICON_SCRAPE 12
-#define BRUSH_ICON_SMOOTH 13
-#define BRUSH_ICON_SNAKE_HOOK 14
-#define BRUSH_ICON_THUMB 15
-#define BRUSH_ICON_TWIST 16
-
-#define BRUSH_ICON_ADD 17
-#define BRUSH_ICON_BLUR 18
-#define BRUSH_ICON_CLONE 19
-#define BRUSH_ICON_DARKEN 20
-#define BRUSH_ICON_LIGHTEN 21
-#define BRUSH_ICON_MIX 22
-#define BRUSH_ICON_MULTIPLY 23
-#define BRUSH_ICON_SMEAR 24
-#define BRUSH_ICON_SOFTEN 25
-#define BRUSH_ICON_SUBTRACT 26
-#define BRUSH_ICON_TEXDRAW 27
-#define BRUSH_ICON_VERTEXDRAW 28
-
-#define BRUSH_ICON_COUNT 29
-
/* ImagePaintSettings.tool */
#define PAINT_TOOL_DRAW 0
#define PAINT_TOOL_SOFTEN 1