Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Show First 20 Lines • Show All 1,485 Lines • ▼ Show 20 Lines | if ((mode == PAINT_MODE_SCULPT) && ss && | ||||
| GPU_line_width(2.0f); | GPU_line_width(2.0f); | ||||
| imm_draw_circle_wire_3d(pos, 0, 0, rds, 80); | imm_draw_circle_wire_3d(pos, 0, 0, rds, 80); | ||||
| GPU_line_width(1.0f); | GPU_line_width(1.0f); | ||||
| immUniformColor3fvAlpha(outline_col, outline_alpha * 0.5f); | immUniformColor3fvAlpha(outline_col, outline_alpha * 0.5f); | ||||
| imm_draw_circle_wire_3d(pos, 0, 0, rds * clamp_f(brush->alpha, 0.0f, 1.0f), 80); | imm_draw_circle_wire_3d(pos, 0, 0, rds * clamp_f(brush->alpha, 0.0f, 1.0f), 80); | ||||
| GPU_matrix_pop(); | GPU_matrix_pop(); | ||||
| /* Cloth brush simulation areas. */ | /* Cloth brush local simulation areas. */ | ||||
| if (brush->sculpt_tool == SCULPT_TOOL_CLOTH) { | if (brush->sculpt_tool == SCULPT_TOOL_CLOTH && | ||||
| brush->cloth_simulation_area_type == BRUSH_CLOTH_SIMULATION_AREA_LOCAL) { | |||||
| GPU_matrix_push(); | GPU_matrix_push(); | ||||
| const float white[3] = {1.0f, 1.0f, 1.0f}; | const float white[3] = {1.0f, 1.0f, 1.0f}; | ||||
| SCULPT_cloth_simulation_limits_draw( | SCULPT_cloth_simulation_limits_draw( | ||||
| pos, brush, vc.obact->obmat, gi.location, gi.normal, rds, 1.0f, white, 0.25f); | pos, brush, vc.obact->obmat, gi.location, gi.normal, rds, 1.0f, white, 0.25f); | ||||
| GPU_matrix_pop(); | GPU_matrix_pop(); | ||||
| } | } | ||||
| /* Layer brush height. */ | /* Layer brush height. */ | ||||
| ▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | if ((mode == PAINT_MODE_SCULPT) && ss && | ||||
| /* Plane falloff preview */ | /* Plane falloff preview */ | ||||
| if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_PLANE) { | if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_PLANE) { | ||||
| GPU_matrix_push(); | GPU_matrix_push(); | ||||
| GPU_matrix_mul(vc.obact->obmat); | GPU_matrix_mul(vc.obact->obmat); | ||||
| SCULPT_cloth_plane_falloff_preview_draw(pos, ss, outline_col, outline_alpha); | SCULPT_cloth_plane_falloff_preview_draw(pos, ss, outline_col, outline_alpha); | ||||
| GPU_matrix_pop(); | GPU_matrix_pop(); | ||||
| } | } | ||||
| /* Display the simulation limits if sculpting outside them. */ | /* Display the simulation limits if sculpting outside them when the simulation is | ||||
| * local. */ | |||||
| /* This does not makes much sense of plane fallof as the fallof is infinte. */ | /* This does not makes much sense of plane fallof as the fallof is infinte. */ | ||||
| else if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_RADIAL) { | else if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_RADIAL && | ||||
sergey: There are two things here (which are not directly related to this specific patch, but which… | |||||
| brush->cloth_simulation_area_type == BRUSH_CLOTH_SIMULATION_AREA_LOCAL) { | |||||
| if (len_v3v3(ss->cache->true_location, ss->cache->true_initial_location) > | if (len_v3v3(ss->cache->true_location, ss->cache->true_initial_location) > | ||||
| ss->cache->radius * (1.0f + brush->cloth_sim_limit)) { | ss->cache->radius * (1.0f + brush->cloth_sim_limit)) { | ||||
| const float red[3] = {1.0f, 0.2f, 0.2f}; | const float red[3] = {1.0f, 0.2f, 0.2f}; | ||||
| GPU_matrix_push(); | GPU_matrix_push(); | ||||
| SCULPT_cloth_simulation_limits_draw(pos, | SCULPT_cloth_simulation_limits_draw(pos, | ||||
| brush, | brush, | ||||
| vc.obact->obmat, | vc.obact->obmat, | ||||
| ss->cache->true_initial_location, | ss->cache->true_initial_location, | ||||
| ▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines | |||||
There are two things here (which are not directly related to this specific patch, but which needs to be addressed as a followup change nevertheless):