Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_mask.c
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | if (data->multires) { | ||||
| BKE_pbvh_node_mark_normals_update(node); | BKE_pbvh_node_mark_normals_update(node); | ||||
| } | } | ||||
| } | } | ||||
| static int mask_flood_fill_exec(bContext *C, wmOperator *op) | static int mask_flood_fill_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| PaintMaskFloodMode mode; | PaintMaskFloodMode mode; | ||||
| float value; | float value; | ||||
| PBVH *pbvh; | PBVH *pbvh; | ||||
| PBVHNode **nodes; | PBVHNode **nodes; | ||||
| int totnode; | int totnode; | ||||
| bool multires; | bool multires; | ||||
| Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | ||||
| ▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | if (is_effected(clip_planes_final, vi.co)) { | ||||
| mask_flood_fill_set_elem(vi.mask, mode, value); | mask_flood_fill_set_elem(vi.mask, mode, value); | ||||
| } | } | ||||
| } | } | ||||
| BKE_pbvh_vertex_iter_end; | BKE_pbvh_vertex_iter_end; | ||||
| } | } | ||||
| bool ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *rect, bool select) | bool ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *rect, bool select) | ||||
| { | { | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Sculpt *sd = vc->scene->toolsettings->sculpt; | Sculpt *sd = vc->scene->toolsettings->sculpt; | ||||
| BoundBox bb; | BoundBox bb; | ||||
| float clip_planes[4][4]; | float clip_planes[4][4]; | ||||
| float clip_planes_final[4][4]; | float clip_planes_final[4][4]; | ||||
| ARegion *ar = vc->ar; | ARegion *ar = vc->ar; | ||||
| Object *ob = vc->obact; | Object *ob = vc->obact; | ||||
| PaintMaskFloodMode mode; | PaintMaskFloodMode mode; | ||||
| float value; | float value; | ||||
| ▲ Show 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) | static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| int mcords_tot; | int mcords_tot; | ||||
| const int(*mcords)[2] = WM_gesture_lasso_path_to_array(C, op, &mcords_tot); | const int(*mcords)[2] = WM_gesture_lasso_path_to_array(C, op, &mcords_tot); | ||||
| if (mcords) { | if (mcords) { | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| float clip_planes[4][4], clip_planes_final[4][4]; | float clip_planes[4][4], clip_planes_final[4][4]; | ||||
| BoundBox bb; | BoundBox bb; | ||||
| Object *ob; | Object *ob; | ||||
| ViewContext vc; | ViewContext vc; | ||||
| LassoMaskData data; | LassoMaskData data; | ||||
| Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | ||||
| int symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL; | int symm = sd->paint.symmetry_flags & PAINT_SYMM_AXIS_ALL; | ||||
| PBVH *pbvh; | PBVH *pbvh; | ||||
| ▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines | |||||