diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-02-10 19:09:00 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-02-10 19:09:00 +0300 |
commit | e89fd502d7b1ee5a4c17286a78ae0116f03510b7 (patch) | |
tree | 5c68b5cb560b3cc5ba62046167d364b2183abb11 /source/blender/editors/sculpt_paint/paint_ops.c | |
parent | 6cd3ebfc9fa4838a74192f2e5cc82b5d5d2e6fe7 (diff) | |
parent | 227a94077f508a47fe7595b9091ab86aecde4ad5 (diff) |
Merge branch 'master' into alembic_pointcache
Conflicts:
CMakeLists.txt
build_files/build_environment/install_deps.sh
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/pointcache.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/intern/MOD_util.c
source/blender/render/intern/source/voxeldata.c
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index ea5f77acc5b..fac1a05862f 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -106,15 +106,14 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) const int old_size = BKE_brush_size_get(scene, brush); int size = (int)(scalar * old_size); - if (old_size == size) { + if (abs(old_size - size) < U.pixelsize) { if (scalar > 1) { - size++; + size += U.pixelsize; } else if (scalar < 1) { - size--; + size -= U.pixelsize; } } - CLAMP(size, 1, 2000); // XXX magic number BKE_brush_size_set(scene, brush, size); } @@ -128,6 +127,8 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) BKE_brush_unprojected_radius_set(scene, brush, unprojected_radius); } + + WM_main_add_notifier(NC_BRUSH | NA_EDITED, brush); } return OPERATOR_FINISHED; |