Blender V5.0
BKE_paint_types.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
8#include "BLI_utildefines.h"
10
14
15namespace blender {
16namespace ocio {
17class ColorSpace;
18}
19} // namespace blender
21enum class PaintMode : int8_t {
22 Sculpt = 0,
24 Vertex = 1,
25 Weight = 2,
31 /* Grease Pencil Vertex Paint */
37
39 /* TODO: Shift the ordering so that invalid is first so that zero-initialization makes sense. */
40 Invalid = 11,
41};
42
43namespace blender::bke {
45 bool initialized = false;
46 uint16_t ob_mode = 0;
49
51 float last_rake_angle = 0.0f;
52
53 int last_stroke_valid = false;
56
62 float brush_rotation = 0.0f;
63 float brush_rotation_sec = 0.0f;
64
65 /*******************************************************************************
66 * all data below are used to communicate with cursor drawing and tex sampling *
67 *******************************************************************************/
68 bool draw_anchored = false;
70
76 float overlap_factor = 0.0f;
77 bool draw_inverted = false;
79 bool stroke_active = false;
80
86 bool last_hit = false;
87
89
94 float pixel_radius = 0.0f;
96 float start_pixel_radius = 0.0f;
97
99 float size_pressure_value = 0.0f;
100
103
106
110
112 void *paint_cursor = nullptr;
113
116};
117}; // namespace blender::bke
PaintMode
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
VecBase< float, 2 > float2
VecBase< float, 3 > float3
blender::float2 anchored_initial_mouse
const blender::ocio::ColorSpace * colorspace
blender::float3 average_stroke_accum
AssetWeakReference * previous_active_brush_reference