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:
authorCampbell Barton <ideasman42@gmail.com>2015-04-13 12:27:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-13 12:30:43 +0300
commit890e533c7695927212a6164c0ca86ff7a314bf5f (patch)
tree911dfafe24573f685935eb30b5451c0c97d107a9 /source/blender/blenkernel/intern
parent176ed5bfe280ef2151f93c0940d54498aaf00d71 (diff)
Fix adding to paint-curves from the first point
- add_index now works when selecting the first point. - sliding now selects the correct handle.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/paint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index a5b608703d1..b45e6b81ec8 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -313,6 +313,11 @@ void BKE_paint_curve_set(Brush *br, PaintCurve *pc)
}
}
+void BKE_paint_curve_clamp_endpoint_add_index(PaintCurve *pc, const int add_index)
+{
+ pc->add_index = (add_index || pc->tot_points == 1) ? (add_index + 1) : 0;
+}
+
/* remove colour from palette. Must be certain color is inside the palette! */
void BKE_palette_color_remove(Palette *palette, PaletteColor *color)
{