From 7dfc1317acc63aea67d4ebd5db8d64c5bef4b8c8 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 20 Aug 2009 05:13:07 +0000 Subject: 2.5/Paint: * Converted vertex paint to use the new stroke system. Now supports the same smooth stroke and stroke spacing as sculpt mode. * Refactored the paint cursor a bit, just sculpt for now but other modes soon. * A couple warning fixes --- source/blender/blenkernel/intern/paint.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/paint.c') diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 80016f23d7c..f0893e058fa 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -154,14 +154,23 @@ int paint_facesel_test(Object *ob) } -void paint_init(Paint *p, const char *name) +void paint_init(Paint *p, const char *col) { 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); + + if(col) + memcpy(p->paint_cursor_col, col, 3); + else { + p->paint_cursor_col[0] = 255; + p->paint_cursor_col[1] = 255; + p->paint_cursor_col[2] = 255; + } + p->paint_cursor_col[3] = 128; } void free_paint(Paint *paint) -- cgit v1.2.3