Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Show First 20 Lines • Show All 1,398 Lines • ▼ Show 20 Lines | if (!ups->stroke_active) { | ||||
| GPU_matrix_mul(cursor_rot); | GPU_matrix_mul(cursor_rot); | ||||
| immUniformColor3fvAlpha(outline_col, outline_alpha); | immUniformColor3fvAlpha(outline_col, outline_alpha); | ||||
| imm_draw_circle_wire_3d(pos, 0, 0, rds, 40); | imm_draw_circle_wire_3d(pos, 0, 0, rds, 40); | ||||
| GPU_matrix_pop(); | GPU_matrix_pop(); | ||||
| /* Update and draw dynamic mesh preview lines */ | /* Update and draw dynamic mesh preview lines */ | ||||
| GPU_matrix_push(); | GPU_matrix_push(); | ||||
| GPU_matrix_mul(vc.obact->obmat); | GPU_matrix_mul(vc.obact->obmat); | ||||
| if (brush->sculpt_tool == SCULPT_TOOL_GRAB && brush->flag & BRUSH_GRAB_ACTIVE_VERTEX) { | if (brush->sculpt_tool == SCULPT_TOOL_GRAB && brush->flag & BRUSH_DYNAMIC_MESH_PREVIEW) { | ||||
| if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && ss->modifiers_active) { | if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && ss->modifiers_active) { | ||||
| sculpt_geometry_preview_lines_update(C, ss, rds); | sculpt_geometry_preview_lines_update(C, ss, rds); | ||||
| sculpt_geometry_preview_lines_draw(pos, ss); | sculpt_geometry_preview_lines_draw(pos, ss); | ||||
| } | } | ||||
| } | } | ||||
| /* Draw pose brush line preview */ | /* Draw pose brush line preview */ | ||||
| if (brush->sculpt_tool == SCULPT_TOOL_POSE && !is_multires) { | if (brush->sculpt_tool == SCULPT_TOOL_POSE && !is_multires) { | ||||
| Show All 26 Lines | else { | ||||
| wmViewport(&ar->winrct); | wmViewport(&ar->winrct); | ||||
| copy_v3_v3(cursor_location, ss->cache->true_location); | copy_v3_v3(cursor_location, ss->cache->true_location); | ||||
| if (ss->cache->brush->sculpt_tool == SCULPT_TOOL_GRAB) { | if (ss->cache->brush->sculpt_tool == SCULPT_TOOL_GRAB) { | ||||
| add_v3_v3(cursor_location, ss->cache->grab_delta); | add_v3_v3(cursor_location, ss->cache->grab_delta); | ||||
| } | } | ||||
| cursor_draw_point_with_symmetry(pos, ar, cursor_location, sd, vc.obact, ss->cache->radius); | cursor_draw_point_with_symmetry(pos, ar, cursor_location, sd, vc.obact, ss->cache->radius); | ||||
| /* Draw cached dynamic mesh preview lines */ | /* Draw cached dynamic mesh preview lines */ | ||||
| if (brush->sculpt_tool == SCULPT_TOOL_GRAB && brush->flag & BRUSH_GRAB_ACTIVE_VERTEX) { | if (brush->sculpt_tool == SCULPT_TOOL_GRAB && brush->flag & BRUSH_DYNAMIC_MESH_PREVIEW) { | ||||
| if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && ss->modifiers_active) { | if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && ss->modifiers_active) { | ||||
| GPU_matrix_push_projection(); | GPU_matrix_push_projection(); | ||||
| ED_view3d_draw_setup_view(CTX_wm_window(C), | ED_view3d_draw_setup_view(CTX_wm_window(C), | ||||
| CTX_data_depsgraph_pointer(C), | CTX_data_depsgraph_pointer(C), | ||||
| CTX_data_scene(C), | CTX_data_scene(C), | ||||
| ar, | ar, | ||||
| CTX_wm_view3d(C), | CTX_wm_view3d(C), | ||||
| NULL, | NULL, | ||||
| ▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||