Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Show First 20 Lines • Show All 1,471 Lines • ▼ Show 20 Lines | if ((mode == PAINT_MODE_SCULPT) && ss && | ||||
| /* Draw 3D active vertex preview with symmetry. */ | /* Draw 3D active vertex preview with symmetry. */ | ||||
| if (len_v3v3(gi.active_vertex_co, gi.location) < rds) { | if (len_v3v3(gi.active_vertex_co, gi.location) < rds) { | ||||
| cursor_draw_point_with_symmetry(pos, ar, gi.active_vertex_co, sd, vc.obact, rds); | cursor_draw_point_with_symmetry(pos, ar, gi.active_vertex_co, sd, vc.obact, rds); | ||||
| } | } | ||||
| /* Draw pose brush origins. */ | /* Draw pose brush origins. */ | ||||
| if (brush->sculpt_tool == SCULPT_TOOL_POSE) { | if (brush->sculpt_tool == SCULPT_TOOL_POSE) { | ||||
| immUniformColor4f(1.0f, 1.0f, 1.0f, 0.8f); | immUniformColor4f(1.0f, 1.0f, 1.0f, 0.8f); | ||||
| if (update_previews) { | |||||
| /* Just after switching to the Pose Brush, the active vertex can be the same and the | |||||
| * cursor won't be tagged to update, so always initialize the preview chain if it is | |||||
| * null before drawing it. */ | |||||
| if (update_previews || !ss->pose_ik_chain_preview) { | |||||
| BKE_sculpt_update_object_for_edit(depsgraph, vc.obact, true, false); | BKE_sculpt_update_object_for_edit(depsgraph, vc.obact, true, false); | ||||
| /* Free the previous pose brush preview. */ | /* Free the previous pose brush preview. */ | ||||
| if (ss->pose_ik_chain_preview) { | if (ss->pose_ik_chain_preview) { | ||||
| SCULPT_pose_ik_chain_free(ss->pose_ik_chain_preview); | SCULPT_pose_ik_chain_free(ss->pose_ik_chain_preview); | ||||
| } | } | ||||
| /* Generate a new pose brush preview from the current cursor location. */ | /* Generate a new pose brush preview from the current cursor location. */ | ||||
| ▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines | |||||