Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Show First 20 Lines • Show All 1,484 Lines • ▼ Show 20 Lines | if ((mode == PAINT_MODE_SCULPT) && ss && | ||||
| 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. */ | ||||
| ss->pose_ik_chain_preview = SCULPT_pose_ik_chain_init( | ss->pose_ik_chain_preview = SCULPT_pose_ik_chain_init( | ||||
| sd, vc.obact, ss, brush, gi.location, rds); | sd, vc.obact, ss, brush, gi.location, rds); | ||||
| } | } | ||||
| /* 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 (!ss->pose_ik_chain_preview) { | |||||
| ss->pose_ik_chain_preview = SCULPT_pose_ik_chain_init( | |||||
| sd, vc.obact, ss, brush, gi.location, rds); | |||||
| } | |||||
| /* Draw the pose brush rotation origins. */ | /* Draw the pose brush rotation origins. */ | ||||
| for (int i = 0; i < ss->pose_ik_chain_preview->tot_segments; i++) { | for (int i = 0; i < ss->pose_ik_chain_preview->tot_segments; i++) { | ||||
| cursor_draw_point_screen_space(pos, | cursor_draw_point_screen_space(pos, | ||||
| ar, | ar, | ||||
| ss->pose_ik_chain_preview->segments[i].initial_orig, | ss->pose_ik_chain_preview->segments[i].initial_orig, | ||||
| vc.obact->obmat, | vc.obact->obmat, | ||||
| 3); | 3); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines | |||||