Blender V5.3
mesh_paint.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9
10#pragma once
11
12#include "BKE_paint_bvh.hh"
13
14#include "BLI_function_ref.hh"
15#include "BLI_index_mask.hh"
17
18#include "DEG_depsgraph.hh"
19
20#include "DNA_object_enums.h"
21
22namespace blender {
23struct ViewContext;
24struct Paint;
25namespace ed::sculpt_paint {
26struct StrokeCache;
27class PaintModeData;
28} // namespace ed::sculpt_paint
29struct Brush;
30struct Depsgraph;
31struct Object;
33struct Scene;
34struct Sculpt;
35} // namespace blender
36
38
40 Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, eObjectMode mode_flag);
41void mode_exit_generic(Scene &scene, Object &ob, eObjectMode mode_flag);
42
44using BrushActionFn = FunctionRef<void(const Depsgraph &depsgraph,
45 const Scene &scene,
46 const Brush &brush,
47 Object &ob,
48 PaintModeData *mode_data)>;
49
50void do_symmetrical_brush_actions(const Depsgraph &depsgraph,
51 const Scene &scene,
52 const Paint &paint,
53 Object &object,
54 BrushActionFn action_fn,
55 PaintModeData *mode_data);
56
62 const Scene &scene,
63 const Paint &paint,
64 Object &object,
65 BrushActionFn action_fn,
66 PaintModeData *paint_mode_data);
67
72 ViewContext &vc, const Paint &paint, const Brush &brush, Object &object, float2 mval);
73
80 const Brush &brush,
81 IndexMaskMemory &memory,
82 FunctionRef<bool(const bke::pbvh::Node &)> node_ignore_fn);
83
84} // namespace blender::ed::sculpt_paint
A BVH for high poly meshes.
void mode_exit_generic(Scene &scene, Object &ob, const eObjectMode mode_flag)
IndexMask gather_brush_nodes(const Object &ob, const Brush &brush, IndexMaskMemory &memory, FunctionRef< bool(const bke::pbvh::Node &)> node_ignore_fn)
void mode_enter_generic(Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, const eObjectMode mode_flag)
Definition mesh_paint.cc:76
void do_symmetrical_brush_actions(const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data)
void do_symmetrical_brush_actions_with_tiling_and_feathering(const Depsgraph &depsgraph, const Scene &scene, const Paint &paint, Object &object, const BrushActionFn action_fn, PaintModeData *paint_mode_data)
void stroke_cache_common_init(ViewContext &vc, const Paint &paint, const Brush &brush, Object &object, const float2 mval)
FunctionRef< void(const Depsgraph &depsgraph, const Scene &scene, const Brush &brush, Object &ob, PaintModeData *mode_data)> BrushActionFn
Definition mesh_paint.hh:44
BMesh Iterators.
VecBase< float, 2 > float2