Blender  V3.3
DNA_brush_defaults.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "DNA_texture_defaults.h"
10 
11 /* Struct members on own line. */
12 /* clang-format off */
13 
14 /* -------------------------------------------------------------------- */
18 #define _DNA_DEFAULT_Brush \
19  { \
20  .blend = 0, \
21  .flag = (BRUSH_ALPHA_PRESSURE | BRUSH_SPACE | BRUSH_SPACE_ATTEN), \
22  .sampling_flag = (BRUSH_PAINT_ANTIALIASING), \
23  \
24  .ob_mode = OB_MODE_ALL_PAINT, \
25  \
26  /* BRUSH SCULPT TOOL SETTINGS */ \
27  .weight = 1.0f, /* weight of brush 0 - 1.0 */ \
28  .size = 35, /* radius of the brush in pixels */ \
29  .alpha = 1.0f, /* brush strength/intensity probably variable should be renamed? */ \
30  .autosmooth_factor = 0.0f, \
31  .topology_rake_factor = 0.0f, \
32  .crease_pinch_factor = 0.5f, \
33  .normal_radius_factor = 0.5f, \
34  .wet_paint_radius_factor = 0.5f, \
35  .area_radius_factor = 0.5f, \
36  .disconnected_distance_max = 0.1f, \
37  .sculpt_plane = SCULPT_DISP_DIR_AREA, \
38  .cloth_damping = 0.01, \
39  .cloth_mass = 1, \
40  .cloth_sim_limit = 2.5f, \
41  .cloth_sim_falloff = 0.75f, \
42  /* How far above or below the plane that is found by averaging the faces. */ \
43  .plane_offset = 0.0f, \
44  .plane_trim = 0.5f, \
45  .clone.alpha = 0.5f, \
46  .normal_weight = 0.0f, \
47  .fill_threshold = 0.2f, \
48  \
49  /* BRUSH PAINT TOOL SETTINGS */ \
50  /* Default rgb color of the brush when painting - white. */ \
51  .rgb = {1.0f, 1.0f, 1.0f}, \
52  \
53  .secondary_rgb = {0, 0, 0}, \
54  \
55  /* BRUSH STROKE SETTINGS */ \
56  /* How far each brush dot should be spaced as a percentage of brush diameter. */ \
57  .spacing = 10, \
58  \
59  .smooth_stroke_radius = 75, \
60  .smooth_stroke_factor = 0.9f, \
61  \
62  /* Time delay between dots of paint or sculpting when doing airbrush mode. */ \
63  .rate = 0.1f, \
64  \
65  .jitter = 0.0f, \
66  \
67  /* Dash */ \
68  .dash_ratio = 1.0f, \
69  .dash_samples = 20, \
70  \
71  .texture_sample_bias = 0, /* value to added to texture samples */ \
72  .texture_overlay_alpha = 33, \
73  .mask_overlay_alpha = 33, \
74  .cursor_overlay_alpha = 33, \
75  .overlay_flags = 0, \
76  \
77  /* Brush appearance. */ \
78  \
79  /* add mode color is light red */ \
80  .add_col = {1.0, 0.39, 0.39, 0.9}, \
81  \
82  /* subtract mode color is light blue */ \
83  .sub_col = {0.39, 0.39, 1.0, 0.9}, \
84  \
85  .stencil_pos = {256, 256}, \
86  .stencil_dimension = {256, 256}, \
87  \
88  /* sculpting defaults to the draw tool for new brushes */ \
89  .sculpt_tool = SCULPT_TOOL_DRAW, \
90  .pose_smooth_iterations = 4, \
91  .pose_ik_segments = 1, \
92  .hardness = 0.0f, \
93  .automasking_boundary_edges_propagation_steps = 1, \
94  \
95  /* A kernel radius of 1 has almost no effect (T63233). */ \
96  .blur_kernel_radius = 2, \
97  \
98  .mtex = _DNA_DEFAULT_MTex, \
99  .mask_mtex = _DNA_DEFAULT_MTex, \
100  }
101 
104 /* clang-format on */