Blender V4.5
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
8
9#pragma once
10
12
13/* clang-format off */
14
15/* -------------------------------------------------------------------- */
18
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 .normal_weight = 0.0f, \
48 .fill_threshold = 0.2f, \
49 \
50 /* BRUSH PAINT BRUSH SETTINGS */ \
51 /* Default rgb color of the brush when painting - white. */ \
52 .rgb = {1.0f, 1.0f, 1.0f}, \
53 \
54 .secondary_rgb = {0, 0, 0}, \
55 \
56 /* BRUSH STROKE SETTINGS */ \
57 /* How far each brush dot should be spaced as a percentage of brush diameter. */ \
58 .spacing = 10, \
59 \
60 .smooth_stroke_radius = 75, \
61 .smooth_stroke_factor = 0.9f, \
62 \
63 /* Time delay between dots of paint or sculpting when doing airbrush mode. */ \
64 .rate = 0.1f, \
65 \
66 .jitter = 0.0f, \
67 \
68 .input_samples = 1, \
69 /* Dash */ \
70 .dash_ratio = 1.0f, \
71 .dash_samples = 20, \
72 \
73 .texture_sample_bias = 0, /* value to added to texture samples */ \
74 .texture_overlay_alpha = 33, \
75 .mask_overlay_alpha = 33, \
76 .cursor_overlay_alpha = 33, \
77 .overlay_flags = 0, \
78 \
79 /* Brush appearance. */ \
80 \
81 /* add mode color is light red */ \
82 .add_col = {1.0, 0.39, 0.39, 0.9}, \
83 \
84 /* subtract mode color is light blue */ \
85 .sub_col = {0.39, 0.39, 1.0, 0.9}, \
86 \
87 .stencil_pos = {256, 256}, \
88 .stencil_dimension = {256, 256}, \
89 .mask_stencil_pos = {256, 256}, \
90 .mask_stencil_dimension = {256, 256}, \
91 \
92 /* sculpting defaults to the draw brush for new brushes */ \
93 .sculpt_brush_type = SCULPT_BRUSH_TYPE_DRAW, \
94 .pose_smooth_iterations = 4, \
95 .pose_ik_segments = 1, \
96 .hardness = 0.0f, \
97 \
98 .automasking_boundary_edges_propagation_steps = 1, \
99 .automasking_start_normal_limit = 0.34906585f, /* 20 degrees */ \
100 .automasking_start_normal_falloff = 0.25f, \
101 .automasking_view_normal_limit = 1.570796, /* 90 degrees */ \
102 .automasking_view_normal_falloff = 0.25f, \
103 .automasking_cavity_blur_steps = 0,\
104 .automasking_cavity_factor = 1.0f,\
105 \
106 /* A kernel radius of 1 has almost no effect (#63233). */ \
107 .blur_kernel_radius = 2, \
108 \
109 .mtex = _DNA_DEFAULT_MTex, \
110 .mask_mtex = _DNA_DEFAULT_MTex, \
111 .falloff_shape = 0,\
112 .tip_scale_x = 1.0f,\
113 .tip_roundness = 1.0f,\
114 }
115
117
118/* clang-format on */