X-Git-Url: https://git.blender.org/gitweb/gitweb.cgi/blender.git/blobdiff_plain/21ca9a6049b7e0948752f06a952d9e13a2966117..4df4b17ed65331b39d77c319f98b7114c0f2ead0:/source/blender/blenkernel/intern/paint.c diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 54192afb904..7c5b2b82b4b 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -39,6 +39,11 @@ #include #include +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) { @@ -87,8 +92,10 @@ void paint_brush_set(Paint *p, Brush *br) } - 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; @@ -152,14 +159,17 @@ int paint_facesel_test(Object *ob) } -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)