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