Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
| Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | static bool vertex_color_set(Object *ob, uint paintcol) | ||||
| return true; | return true; | ||||
| } | } | ||||
| static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op)) | static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Object *obact = CTX_data_active_object(C); | Object *obact = CTX_data_active_object(C); | ||||
| unsigned int paintcol = vpaint_get_current_col(scene, scene->toolsettings->vpaint); | unsigned int paintcol = vpaint_get_current_col(scene, scene->toolsettings->vpaint, false); | ||||
| if (vertex_color_set(obact, paintcol)) { | if (vertex_color_set(obact, paintcol)) { | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obact); | WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obact); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| else { | else { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 458 Lines • Show Last 20 Lines | |||||