Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_filter_color.c
| Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | static int sculpt_color_filter_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| if (BKE_pbvh_type(pbvh) != PBVH_FACES) { | if (BKE_pbvh_type(pbvh) != PBVH_FACES) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (!ss->vcol) { | if (!ss->vcol) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| SCULPT_undo_push_begin("color filter"); | SCULPT_undo_push_begin(ob, "color filter"); | ||||
| BKE_sculpt_color_layer_create_if_needed(ob); | BKE_sculpt_color_layer_create_if_needed(ob); | ||||
| /* CTX_data_ensure_evaluated_depsgraph should be used at the end to include the updates of | /* CTX_data_ensure_evaluated_depsgraph should be used at the end to include the updates of | ||||
| * earlier steps modifying the data. */ | * earlier steps modifying the data. */ | ||||
| Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| const bool needs_topology_info = mode == COLOR_FILTER_SMOOTH || use_automasking; | const bool needs_topology_info = mode == COLOR_FILTER_SMOOTH || use_automasking; | ||||
| BKE_sculpt_update_object_for_edit(depsgraph, ob, needs_topology_info, false, true); | BKE_sculpt_update_object_for_edit(depsgraph, ob, needs_topology_info, false, true); | ||||
| Show All 37 Lines | |||||