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>2012-04-30 00:04:25 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-04-30 00:04:25 +0400
commitf7ec94cbc6c7dc761f127c50081b3383a58a1c2e (patch)
tree715ceee7a26b754890954cc38672ae5cfe334a3e /source/blender/makesdna
parent44d81faa432b3b778da10139b652371cfdc7cbb3 (diff)
Add per-brush weight field.
Patch from Jaggz H, thanks! [#31096] Weight-painting: Brush-specific weights http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9 Each brush's weight can now be set individually, can also enable unified setting (same as size and strength have.) Added readfile code to the patch: subversion bumped to 1, brushes get default weight of 0.5, unified weight enabled by default and value from old vgroup_weight field.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_brush_types.h3
-rw-r--r--source/blender/makesdna/DNA_scene_types.h8
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 0d06b55f1d3..c531225775a 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -65,6 +65,7 @@ typedef struct Brush {
short blend; /* blend mode */
short ob_mode; /* & with ob->mode to see if the brush is compatible, use for display only. */
+ float weight; /* brush weight */
int size; /* brush diameter */
int flag; /* general purpose flag */
float jitter; /* jitter the position of the brush */
@@ -83,7 +84,7 @@ typedef struct Brush {
char sculpt_tool; /* active sculpt tool */
char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */
char imagepaint_tool; /* active image paint tool */
- char pad3[5];
+ char pad;
float autosmooth_factor;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 83688e30643..81cc4f13372 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -851,13 +851,18 @@ typedef struct UnifiedPaintSettings {
/* unified strength of brush */
float alpha;
+ /* unified brush weight, [0, 1] */
+ float weight;
+
/* user preferences for sculpt and paint */
int flag;
+ int pad;
} UnifiedPaintSettings;
typedef enum {
UNIFIED_PAINT_SIZE = (1<<0),
UNIFIED_PAINT_ALPHA = (1<<1),
+ UNIFIED_PAINT_WEIGHT = (1<<5),
/* only used if unified size is enabled, mirros the brush flags
* BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */
@@ -878,7 +883,8 @@ typedef struct ToolSettings {
Sculpt *sculpt;
UvSculpt *uvsculpt; /* uv smooth */
- /* Vertex groups */
+ /* Vertex group weight - used only for editmode, not weight
+ paint */
float vgroup_weight;
/* Subdivide Settings */