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
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')
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_brush.h1
-rw-r--r--source/blender/blenkernel/intern/brush.c10
3 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 19ca0f8cc61..4ea38628001 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 263
-#define BLENDER_SUBVERSION 2
+#define BLENDER_SUBVERSION 3
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index 2a62d204e78..52666ca1538 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -100,6 +100,7 @@ void brush_set_unprojected_radius(struct Scene *scene, struct Brush *brush, flo
float brush_alpha(const struct Scene *scene, struct Brush *brush);
float brush_weight(const Scene *scene, struct Brush *brush);
+void brush_set_weight(const Scene *scene, struct Brush *brush, float value);
int brush_use_locked_size(const struct Scene *scene, struct Brush *brush);
int brush_use_alpha_pressure(const struct Scene *scene, struct Brush *brush);
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,