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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-02 20:05:25 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-02 20:05:25 +0400
commita0642a259759ebd76a956433a2949b94b00374bb (patch)
tree72fef4e7b0d1fd05ea9fe0bca8d1dcffd397ec42 /source/blender/blenkernel/intern/brush.c
parentb2a9d012b4e0ce820cb81ce170d84bed143ac041 (diff)
Fix wrong unified weight paint value version patch, was doing incorrect version check.
Fix #31209: weight paint sample & fill not using correct brush/unified value.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 917c59b35a1..b3d128bf2b4 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -718,6 +718,16 @@ float brush_weight(const Scene *scene, Brush *brush)
return (ups->flag & UNIFIED_PAINT_WEIGHT) ? ups->weight : brush->weight;
}
+void brush_set_weight(const Scene *scene, Brush *brush, float value)
+{
+ UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
+
+ if(ups->flag & UNIFIED_PAINT_WEIGHT)
+ ups->weight = value;
+ else
+ brush->weight = value;
+}
+
/* scale unprojected radius to reflect a change in the brush's 2D size */
void brush_scale_unprojected_radius(float *unprojected_radius,
int new_brush_size,