Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_cloth.c
| Show First 20 Lines • Show All 1,542 Lines • ▼ Show 20 Lines | static int sculpt_cloth_filter_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| mouse[1] = event->mval[1]; | mouse[1] = event->mval[1]; | ||||
| SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false); | SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false); | ||||
| SCULPT_vertex_random_access_ensure(ss); | SCULPT_vertex_random_access_ensure(ss); | ||||
| /* Needs mask data to be available as it is used when solving the constraints. */ | /* Needs mask data to be available as it is used when solving the constraints. */ | ||||
| BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); | BKE_sculpt_update_object_for_edit(depsgraph, ob, true, true, false); | ||||
| SCULPT_undo_push_begin("Cloth filter"); | SCULPT_undo_push_begin(ob, "Cloth filter"); | ||||
| SCULPT_filter_cache_init(C, ob, sd, SCULPT_UNDO_COORDS); | SCULPT_filter_cache_init(C, ob, sd, SCULPT_UNDO_COORDS); | ||||
| ss->filter_cache->automasking = SCULPT_automasking_cache_init(sd, NULL, ob); | ss->filter_cache->automasking = SCULPT_automasking_cache_init(sd, NULL, ob); | ||||
| const float cloth_mass = RNA_float_get(op->ptr, "cloth_mass"); | const float cloth_mass = RNA_float_get(op->ptr, "cloth_mass"); | ||||
| const float cloth_damping = RNA_float_get(op->ptr, "cloth_damping"); | const float cloth_damping = RNA_float_get(op->ptr, "cloth_damping"); | ||||
| const bool use_collisions = RNA_boolean_get(op->ptr, "use_collisions"); | const bool use_collisions = RNA_boolean_get(op->ptr, "use_collisions"); | ||||
| ss->filter_cache->cloth_sim = SCULPT_cloth_brush_simulation_create( | ss->filter_cache->cloth_sim = SCULPT_cloth_brush_simulation_create( | ||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | |||||