diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-06 17:24:15 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-06 17:24:15 +0300 |
commit | 69d4aec55f9c5bc64c58e43edefc6687fcb9d08b (patch) | |
tree | ded4a8da676e18914499a2b125226d2231308f87 /source/blender/editors/sculpt_paint/sculpt_cloth.c | |
parent | b201a67faa350ef1f8f7a27997b82ec19551c11d (diff) |
Cleanup: Use the SCULPT_ prefix in all sculpt_intern functions
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_cloth.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_cloth.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index 295e7e50d73..07a4dab926e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -112,7 +112,7 @@ static void cloth_brush_add_length_constraint(SculptSession *ss, const int v1, c cloth_sim->length_constraints[cloth_sim->tot_length_constraints].v1 = v1; cloth_sim->length_constraints[cloth_sim->tot_length_constraints].v2 = v2; cloth_sim->length_constraints[cloth_sim->tot_length_constraints].length = len_v3v3( - sculpt_vertex_co_get(ss, v1), sculpt_vertex_co_get(ss, v2)); + SCULPT_vertex_co_get(ss, v1), SCULPT_vertex_co_get(ss, v2)); cloth_sim->tot_length_constraints++; @@ -220,7 +220,7 @@ static void do_cloth_brush_apply_forces_task_cb_ex(void *__restrict userdata, const float bstrength = ss->cache->bstrength; SculptBrushTest test; - SculptBrushTestFn sculpt_brush_test_sq_fn = sculpt_brush_test_init_with_falloff_shape( + SculptBrushTestFn sculpt_brush_test_sq_fn = SCULPT_brush_test_init_with_falloff_shape( ss, &test, data->brush->falloff_shape); /* For Pich Perpendicular Deform Type. */ @@ -262,15 +262,15 @@ static void do_cloth_brush_apply_forces_task_cb_ex(void *__restrict userdata, } const float fade = sim_factor * bstrength * - tex_strength(ss, - brush, - vd.co, - dist, - vd.no, - vd.fno, - vd.mask ? *vd.mask : 0.0f, - vd.index, - tls->thread_id); + SCULPT_brush_strength_factor(ss, + brush, + vd.co, + dist, + vd.no, + vd.fno, + vd.mask ? *vd.mask : 0.0f, + vd.index, + tls->thread_id); float brush_disp[3]; float normal[3]; @@ -337,7 +337,7 @@ static void do_cloth_brush_apply_forces_task_cb_ex(void *__restrict userdata, static SculptClothSimulation *cloth_brush_simulation_create(SculptSession *ss, Brush *brush) { - const int totverts = sculpt_vertex_count_get(ss); + const int totverts = SCULPT_vertex_count_get(ss); SculptClothSimulation *cloth_sim; cloth_sim = MEM_callocN(sizeof(SculptClothSimulation), "cloth constraints"); @@ -448,8 +448,8 @@ static void cloth_brush_satisfy_constraints(SculptSession *ss, mul_v3_v3fl(correction_vector, v1_to_v2, 1.0f - (constraint_distance / current_distance)); mul_v3_v3fl(correction_vector_half, correction_vector, 0.5f); - const float mask_v1 = (1.0f - sculpt_vertex_mask_get(ss, v1)); - const float mask_v2 = (1.0f - sculpt_vertex_mask_get(ss, v2)); + const float mask_v1 = (1.0f - SCULPT_vertex_mask_get(ss, v1)); + const float mask_v2 = (1.0f - SCULPT_vertex_mask_get(ss, v2)); const float sim_factor_v1 = cloth_brush_simulation_falloff_get( brush, ss->cache->radius, ss->cache->initial_location, cloth_sim->init_pos[v1]); @@ -569,7 +569,7 @@ void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode { SculptSession *ss = ob->sculpt; Brush *brush = BKE_paint_brush(&sd->paint); - const int totverts = sculpt_vertex_count_get(ss); + const int totverts = SCULPT_vertex_count_get(ss); /* In the first brush step of each symmetry pass, build the constraints for the vertices in all * nodes inside the simulation's limits. */ @@ -581,8 +581,8 @@ void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode if (ss->cache->mirror_symmetry_pass == 0) { ss->cache->cloth_sim = cloth_brush_simulation_create(ss, brush); for (int i = 0; i < totverts; i++) { - copy_v3_v3(ss->cache->cloth_sim->prev_pos[i], sculpt_vertex_co_get(ss, i)); - copy_v3_v3(ss->cache->cloth_sim->init_pos[i], sculpt_vertex_co_get(ss, i)); + copy_v3_v3(ss->cache->cloth_sim->prev_pos[i], SCULPT_vertex_co_get(ss, i)); + copy_v3_v3(ss->cache->cloth_sim->init_pos[i], SCULPT_vertex_co_get(ss, i)); } } @@ -594,7 +594,7 @@ void SCULPT_do_cloth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode /* Store the initial state in the simulation. */ for (int i = 0; i < totverts; i++) { - copy_v3_v3(ss->cache->cloth_sim->pos[i], sculpt_vertex_co_get(ss, i)); + copy_v3_v3(ss->cache->cloth_sim->pos[i], SCULPT_vertex_co_get(ss, i)); } /* Apply forces to the vertices. */ |