Blender V5.3
paint_cursor.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
8
9#pragma once
10
11#include "DNA_brush_types.h"
12#include "DNA_object_types.h"
13#include "DNA_scene_types.h"
14#include "DNA_screen_types.h"
16
17#include "BKE_paint.hh"
18#include "BKE_paint_types.hh"
19
20#include "ED_view3d.hh"
21
28
30 ARegion *region = nullptr;
31 wmWindow *win = nullptr;
32 wmWindowManager *wm = nullptr;
33 bScreen *screen = nullptr;
34 Depsgraph *depsgraph = nullptr;
35 Scene *scene = nullptr;
36 Object *object = nullptr;
37 Base *base = nullptr;
39 Brush *brush = nullptr;
40 Paint *paint = nullptr;
43
44 /* Sculpt related data. */
45 Sculpt *sd = nullptr;
46 SculptSession *ss = nullptr;
47
52
54 bool is_brush_active = false;
55 bool is_stroke_active = false;
56 bool is_cursor_over_mesh = false;
57 float radius = 0.0f;
58
59 /* 3D view cursor position and normal. */
63
64 /* Cursor main colors. */
66 float outline_alpha = 0.0f;
67
68 /* GPU attribute for drawing. */
69 uint pos = 0;
70
72
73 /* This variable is set after drawing the overlay, not on initialization. It can't be used for
74 * checking if alpha overlay is enabled before drawing it. */
75 bool alpha_overlay_drawn = false;
76
77 float zoomx = 0.0f;
78 /* Coordinates in region space */
80
81 /* TODO: Figure out why this and mval are used interchangeably */
83
85
86 float final_radius = 0.0f;
87 int pixel_radius = 0;
88};
89
91
95} // namespace blender::ed::sculpt_paint
Object is a sort of wrapper for general info.
void mesh_cursor_inactive_draw(PaintCursorContext &pcontext)
void grease_pencil_cursor_draw(PaintCursorContext &pcontext)
void mesh_cursor_active_draw(PaintCursorContext &pcontext)
void mesh_cursor_update_and_init(PaintCursorContext &pcontext)
unsigned int uint
Definition BKE_text.h:55
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
VecBase< float, 3 > float3