#include <stdlib.h>
#include <string.h>
+const char PAINT_CURSOR_SCULPT[3] = {255, 100, 100};
+const char PAINT_CURSOR_VERTEX_PAINT[3] = {255, 255, 255};
+const char PAINT_CURSOR_WEIGHT_PAINT[3] = {200, 200, 255};
+const char PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255};
+
Paint *paint_get_active(Scene *sce)
{
if(sce && sce->basact && sce->basact->object) {
}
- if(!found)
+ if(!found) {
paint_brush_slot_add(p);
+ id_us_plus(&br->id);
+ }
/* Make sure the current slot is the new brush */
p->brushes[p->active_brush_index] = br;
}
-void paint_init(Paint *p, const char *name)
+void paint_init(Paint *p, const char col[3])
{
Brush *brush;
/* If there's no brush, create one */
brush = paint_brush(p);
- brush_check_exists(&brush, name);
+ brush_check_exists(&brush, "Brush");
paint_brush_set(p, brush);
+
+ memcpy(p->paint_cursor_col, col, 3);
+ p->paint_cursor_col[3] = 128;
}
void free_paint(Paint *paint)