Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_vertex.c
| Show First 20 Lines • Show All 2,518 Lines • ▼ Show 20 Lines | static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) | ||||
| Mesh *me = BKE_mesh_from_object(ob); | Mesh *me = BKE_mesh_from_object(ob); | ||||
| /* toggle: end vpaint */ | /* toggle: end vpaint */ | ||||
| if (is_mode_set) { | if (is_mode_set) { | ||||
| ED_object_vpaintmode_exit_ex(ob); | ED_object_vpaintmode_exit_ex(ob); | ||||
| } | } | ||||
| else { | else { | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C); | Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C); | ||||
| if (depsgraph) { | |||||
| depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | |||||
| } | |||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| ED_object_vpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob); | ED_object_vpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob); | ||||
| BKE_paint_toolslots_brush_validate(bmain, &ts->vpaint->paint); | BKE_paint_toolslots_brush_validate(bmain, &ts->vpaint->paint); | ||||
| } | } | ||||
| BKE_mesh_batch_cache_dirty_tag(ob->data, BKE_MESH_BATCH_DIRTY_ALL); | BKE_mesh_batch_cache_dirty_tag(ob->data, BKE_MESH_BATCH_DIRTY_ALL); | ||||
| /* update modifier stack for mapping requirements */ | /* update modifier stack for mapping requirements */ | ||||
| ▲ Show 20 Lines • Show All 900 Lines • Show Last 20 Lines | |||||