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-03-19 22:07:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-19 22:08:38 +0300
commit81472aff2be5a8059e046436b4d1810659032716 (patch)
treefeb17572be55e29d82af3c67eca7f76a6f605623 /source/blender/blenkernel/intern/paint.c
parenteee538f0d262a430cc622bfe17eef7dba9b251c7 (diff)
Remove deleted list for palette colors
was used because of UI memory access only.
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 2082066d395..c3c88389e11 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -314,7 +314,7 @@ void BKE_paint_curve_set(Brush *br, PaintCurve *pc)
}
/* remove colour from palette. Must be certain color is inside the palette! */
-void BKE_palette_color_remove_ex(Palette *palette, PaletteColor *color, bool use_free)
+void BKE_palette_color_remove(Palette *palette, PaletteColor *color)
{
if (BLI_listbase_count_ex(&palette->colors, palette->active_color) == palette->active_color) {
palette->active_color--;
@@ -326,32 +326,15 @@ void BKE_palette_color_remove_ex(Palette *palette, PaletteColor *color, bool use
palette->active_color = 0;
}
- if (use_free) {
- MEM_freeN(color);
- }
- else {
- BLI_addhead(&palette->deleted, color);
- }
-}
-
-void BKE_palette_color_remove(Palette *palette, PaletteColor *color)
-{
- BKE_palette_color_remove_ex(palette, color, false);
+ MEM_freeN(color);
}
void BKE_palette_clear(Palette *palette)
{
BLI_freelistN(&palette->colors);
- BLI_freelistN(&palette->deleted);
palette->active_color = 0;
}
-void BKE_palette_cleanup(Palette *palette)
-{
- BLI_freelistN(&palette->deleted);
-}
-
-
Palette *BKE_palette_add(Main *bmain, const char *name)
{
Palette *palette;