2.5 Texture paint:
[blender.git] / source / blender / blenkernel / intern / paint.c
index 8e774e4c85a45f3f6c1ca21c126a9fa52091e85c..5ae8411835609a0d7e8bdde12d0c75b534cb897c 100644 (file)
@@ -158,6 +158,10 @@ void free_paint(Paint *paint)
 
 void copy_paint(Paint *orig, Paint *new)
 {
-       if(orig->brushes)
+       if(orig->brushes) {
+               int i;
                new->brushes = MEM_dupallocN(orig->brushes);
+               for(i = 0; i < orig->brush_count; ++i)
+                       id_us_plus((ID *)new->brushes[i]);
+       }
 }