RNA: review of commits in the past days, check the diffs for the
[blender.git] / source / blender / makesdna / DNA_brush_types.h
1 /**
2  * $Id$
3  *
4  * ***** BEGIN GPL LICENSE BLOCK *****
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version. 
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19  *
20  * The Original Code is Copyright (C) 2005 Blender Foundation.
21  * All rights reserved.
22  *
23  * The Original Code is: all of this file.
24  *
25  * Contributor(s): none yet.
26  *
27  * ***** END GPL LICENSE BLOCK *****
28  */
29
30 #ifndef DNA_BRUSH_TYPES_H
31 #define DNA_BRUSH_TYPES_H
32
33 #include "DNA_ID.h"
34
35 #ifndef MAX_MTEX
36 #define MAX_MTEX        18
37 #endif
38
39 struct MTex;
40 struct Image;
41
42 typedef struct BrushClone {
43         struct Image *image;            /* image for clone tool */
44         float offset[2];                        /* offset of clone image from canvas */
45         float alpha, pad;                       /* transparency for drawing of clone image */
46 } BrushClone;
47
48 typedef struct Brush {
49         ID id;
50         
51         short flag, blend;                      /* general purpose flag, blend mode */
52         int size;                                       /* brush diameter */
53         float innerradius;                      /* inner radius after which the falloff starts */
54         float spacing;                          /* spacing of paint operations */
55         float rate;                                     /* paint operations / second (airbrush) */
56
57         float rgb[3];                           /* color */
58         float alpha;                            /* opacity */
59
60         short texact, pad;
61         struct MTex *mtex[18];          /* MAX_MTEX */
62
63         struct BrushClone clone;
64 } Brush;
65
66 /* Brush.flag */
67 #define BRUSH_AIRBRUSH                  1
68 #define BRUSH_TORUS                             2
69 #define BRUSH_ALPHA_PRESSURE    4
70 #define BRUSH_SIZE_PRESSURE             8
71 #define BRUSH_RAD_PRESSURE              16
72 #define BRUSH_SPACING_PRESSURE  32
73 #define BRUSH_FIXED_TEX                 64
74
75 /* Brush.blend */
76 #define BRUSH_BLEND_MIX                 0
77 #define BRUSH_BLEND_ADD                 1
78 #define BRUSH_BLEND_SUB                 2
79 #define BRUSH_BLEND_MUL                 3
80 #define BRUSH_BLEND_LIGHTEN             4
81 #define BRUSH_BLEND_DARKEN              5
82 #define BRUSH_BLEND_ERASE_ALPHA 6
83 #define BRUSH_BLEND_ADD_ALPHA   7
84
85 #define PAINT_TOOL_DRAW         0
86 #define PAINT_TOOL_SOFTEN       1
87 #define PAINT_TOOL_SMEAR        2
88 #define PAINT_TOOL_CLONE        3
89
90 #endif
91