Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_transform.c
| Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | BKE_pbvh_vertex_iter_begin (ss->pbvh, node, vd, PBVH_ITER_UNIQUE) { | ||||
| copy_v3_v3(transformed_co, start_co); | copy_v3_v3(transformed_co, start_co); | ||||
| mul_m4_v3(data->transform_mats[(int)symm_area], transformed_co); | mul_m4_v3(data->transform_mats[(int)symm_area], transformed_co); | ||||
| sub_v3_v3v3(disp, transformed_co, start_co); | sub_v3_v3v3(disp, transformed_co, start_co); | ||||
| mul_v3_fl(disp, 1.0f - fade); | mul_v3_fl(disp, 1.0f - fade); | ||||
| add_v3_v3v3(vd.co, start_co, disp); | add_v3_v3v3(vd.co, start_co, disp); | ||||
| if (vd.mvert) { | if (vd.mvert) { | ||||
| BKE_pbvh_vert_mark_update(ss->pbvh, vd.vertex); | BKE_pbvh_vert_tag_update_normal(ss->pbvh, vd.vertex); | ||||
| } | } | ||||
| } | } | ||||
| BKE_pbvh_vertex_iter_end; | BKE_pbvh_vertex_iter_end; | ||||
| BKE_pbvh_node_mark_update(node); | BKE_pbvh_node_mark_update(node); | ||||
| } | } | ||||
| static void sculpt_transform_all_vertices(Sculpt *sd, Object *ob) | static void sculpt_transform_all_vertices(Sculpt *sd, Object *ob) | ||||
| ▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | BKE_pbvh_vertex_iter_begin (ss->pbvh, node, vd, PBVH_ITER_UNIQUE) { | ||||
| float final_disp[3]; | float final_disp[3]; | ||||
| BKE_kelvinlet_grab_triscale(final_disp, ¶ms, vd.co, data->elastic_transform_pivot, disp); | BKE_kelvinlet_grab_triscale(final_disp, ¶ms, vd.co, data->elastic_transform_pivot, disp); | ||||
| mul_v3_fl(final_disp, 20.0f * (1.0f - fade)); | mul_v3_fl(final_disp, 20.0f * (1.0f - fade)); | ||||
| copy_v3_v3(proxy[vd.i], final_disp); | copy_v3_v3(proxy[vd.i], final_disp); | ||||
| if (vd.mvert) { | if (vd.mvert) { | ||||
| BKE_pbvh_vert_mark_update(ss->pbvh, vd.vertex); | BKE_pbvh_vert_tag_update_normal(ss->pbvh, vd.vertex); | ||||
| } | } | ||||
| } | } | ||||
| BKE_pbvh_vertex_iter_end; | BKE_pbvh_vertex_iter_end; | ||||
| BKE_pbvh_node_mark_update(node); | BKE_pbvh_node_mark_update(node); | ||||
| } | } | ||||
| static void sculpt_transform_radius_elastic(Sculpt *sd, Object *ob, const float transform_radius) | static void sculpt_transform_radius_elastic(Sculpt *sd, Object *ob, const float transform_radius) | ||||
| ▲ Show 20 Lines • Show All 275 Lines • Show Last 20 Lines | |||||