Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_filter_color.c
| Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { | ||||
| SCULPT_flush_update_done(C, ob, SCULPT_UPDATE_COLOR); | SCULPT_flush_update_done(C, ob, SCULPT_UPDATE_COLOR); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| if (event->type != MOUSEMOVE) { | if (event->type != MOUSEMOVE) { | ||||
| return OPERATOR_RUNNING_MODAL; | return OPERATOR_RUNNING_MODAL; | ||||
| } | } | ||||
| float len = event->prevclickx - event->mval[0]; | const float len = event->prevclickx - event->x; | ||||
| filter_strength = filter_strength * -len * 0.001f; | filter_strength = filter_strength * -len * 0.001f; | ||||
| float fill_color[3]; | float fill_color[3]; | ||||
| RNA_float_get_array(op->ptr, "fill_color", fill_color); | RNA_float_get_array(op->ptr, "fill_color", fill_color); | ||||
| IMB_colormanagement_srgb_to_scene_linear_v3(fill_color); | IMB_colormanagement_srgb_to_scene_linear_v3(fill_color); | ||||
| SculptThreadedTaskData data = { | SculptThreadedTaskData data = { | ||||
| .sd = sd, | .sd = sd, | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||