Blender V5.3
rna_brush.cc
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#include <cstdlib>
10
11#include "DNA_brush_types.h"
13#include "DNA_scene_types.h"
14#include "DNA_texture_types.h"
15
16#include "BLI_math_base_c.hh"
18
19#include "BLT_translation.hh"
20
21#include "RNA_define.hh"
22#include "RNA_enum_types.hh"
23
24#include "rna_internal.hh"
25
26#include "IMB_imbuf.hh"
27
28#include "WM_types.hh"
29
30namespace blender {
31
33 {0, "ADD", ICON_ADD, "Add", "Add effect of brush"},
34 {BRUSH_DIR_IN, "SUBTRACT", ICON_REMOVE, "Subtract", "Subtract effect of brush"},
35 {0, nullptr, 0, nullptr, nullptr},
36};
37
39 {BRUSH_STROKE_DOTS, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
41 "DRAG_DOT",
42 0,
43 "Drag Dot",
44 "Allows a single dot to be carefully positioned"},
46 "SPACE",
47 0,
48 "Space",
49 "Limit brush application to the distance specified by spacing"},
51 "AIRBRUSH",
52 0,
53 "Airbrush",
54 "Keep applying paint effect while holding mouse (spray)"},
56 "ANCHORED",
57 0,
58 "Anchored",
59 "Keep the brush anchored to the initial location"},
60 {BRUSH_STROKE_LINE, "LINE", 0, "Line", "Draw a line with dabs separated according to spacing"},
62 "CURVE",
63 0,
64 "Curve",
65 "Define the stroke curve with a Bézier curve (dabs are separated according to spacing)"},
66 {0, nullptr, 0, nullptr, nullptr},
67};
68
70 {MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
71 {MTEX_MAP_MODE_AREA, "AREA_PLANE", 0, "Area Plane", ""},
72 {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
73 {MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
74 {MTEX_MAP_MODE_RANDOM, "RANDOM", 0, "Random", ""},
75 {MTEX_MAP_MODE_STENCIL, "STENCIL", 0, "Stencil", ""},
76 {0, nullptr, 0, nullptr, nullptr},
77};
78
80 {BRUSH_CURVE_CUSTOM, "CUSTOM", ICON_RNDCURVE, "Custom", ""},
81 {BRUSH_CURVE_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
82 {BRUSH_CURVE_SMOOTHER, "SMOOTHER", ICON_SMOOTHCURVE, "Smoother", ""},
83 {BRUSH_CURVE_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", ""},
84 {BRUSH_CURVE_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
85 {BRUSH_CURVE_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
86 {BRUSH_CURVE_LIN, "LIN", ICON_LINCURVE, "Linear", ""},
87 {BRUSH_CURVE_POW4, "POW4", ICON_SHARPCURVE, "Sharper", ""},
88 {BRUSH_CURVE_INVSQUARE, "INVSQUARE", ICON_INVERSESQUARECURVE, "Inverse Square", ""},
89 {BRUSH_CURVE_CONSTANT, "CONSTANT", ICON_NOCURVE, "Constant", ""},
90 {0, nullptr, 0, nullptr, nullptr},
91};
92
93/* NOTE: we don't actually turn these into a single enum bit-mask property,
94 * instead we construct individual boolean properties. */
97 "use_automasking_topology",
98 0,
99 "Topology",
100 "Affect only vertices connected to the active vertex under the brush"},
102 "use_automasking_face_sets",
103 0,
104 "Face Sets",
105 "Affect only vertices that share face sets with the active vertex"},
107 "use_automasking_boundary_edges",
108 0,
109 "Mesh Boundary Auto-Masking",
110 "Do not affect non manifold boundary edges"},
112 "use_automasking_boundary_face_sets",
113 0,
114 "Face Sets Boundary Automasking",
115 "Do not affect vertices that belong to a face set boundary"},
117 "use_automasking_cavity",
118 0,
119 "Cavity Mask",
120 "Do not affect vertices on peaks, based on the surface curvature"},
122 "use_automasking_cavity_inverted",
123 0,
124 "Inverted Cavity Mask",
125 "Do not affect vertices within crevices, based on the surface curvature"},
127 "use_automasking_custom_cavity_curve",
128 0,
129 "Custom Cavity Curve",
130 "Use custom curve"},
132 "use_automasking_start_normal",
133 0,
134 "Area Normal",
135 "Affect only vertices with a similar normal to where the stroke starts"},
137 "use_automasking_view_normal",
138 0,
139 "View Normal",
140 "Affect only vertices with a normal that faces the viewer"},
142 "use_automasking_view_occlusion",
143 0,
144 "Occlusion",
145 "Only affect vertices that are not occluded by other faces (slower performance)"},
146 {0, nullptr, 0, nullptr, nullptr}};
147
149 {SCULPT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
150 {SCULPT_BRUSH_TYPE_DRAW_SHARP, "DRAW_SHARP", 0, "Draw Sharp", ""},
151 {SCULPT_BRUSH_TYPE_CLAY, "CLAY", 0, "Clay", ""},
152 {SCULPT_BRUSH_TYPE_CLAY_STRIPS, "CLAY_STRIPS", 0, "Clay Strips", ""},
153 {SCULPT_BRUSH_TYPE_CLAY_THUMB, "CLAY_THUMB", 0, "Clay Thumb", ""},
154 {SCULPT_BRUSH_TYPE_LAYER, "LAYER", 0, "Layer", ""},
155 {SCULPT_BRUSH_TYPE_INFLATE, "INFLATE", 0, "Inflate", ""},
156 {SCULPT_BRUSH_TYPE_BLOB, "BLOB", 0, "Blob", ""},
157 {SCULPT_BRUSH_TYPE_CREASE, "CREASE", 0, "Crease", ""},
159 {SCULPT_BRUSH_TYPE_SMOOTH, "SMOOTH", 0, "Smooth", ""},
160 {SCULPT_BRUSH_TYPE_PLANE, "PLANE", 0, "Plane", ""},
161 {SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE, "MULTIPLANE_SCRAPE", 0, "Multi-plane Scrape", ""},
162 {SCULPT_BRUSH_TYPE_PINCH, "PINCH", 0, "Pinch", ""},
164 {SCULPT_BRUSH_TYPE_GRAB, "GRAB", 0, "Grab", ""},
165 {SCULPT_BRUSH_TYPE_ELASTIC_DEFORM, "ELASTIC_DEFORM", 0, "Elastic Deform", ""},
166 {SCULPT_BRUSH_TYPE_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""},
167 {SCULPT_BRUSH_TYPE_THUMB, "THUMB", 0, "Thumb", ""},
168 {SCULPT_BRUSH_TYPE_POSE, "POSE", 0, "Pose", ""},
169 {SCULPT_BRUSH_TYPE_NUDGE, "NUDGE", 0, "Nudge", ""},
170 {SCULPT_BRUSH_TYPE_ROTATE, "ROTATE", 0, "Rotate", ""},
171 {SCULPT_BRUSH_TYPE_SLIDE_RELAX, "TOPOLOGY", 0, "Slide Relax", ""},
172 {SCULPT_BRUSH_TYPE_BOUNDARY, "BOUNDARY", 0, "Boundary", ""},
173 {SCULPT_BRUSH_TYPE_SCENE_PROJECT, "SCENE_PROJECT", 0, "Scene Project", ""},
175 {SCULPT_BRUSH_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
176 {SCULPT_BRUSH_TYPE_SIMPLIFY, "SIMPLIFY", 0, "Simplify", ""},
177 {SCULPT_BRUSH_TYPE_MASK, "MASK", 0, "Mask", ""},
178 {SCULPT_BRUSH_TYPE_DRAW_FACE_SETS, "DRAW_FACE_SETS", 0, "Draw Face Sets", ""},
180 "DISPLACEMENT_ERASER",
181 0,
182 "Multires Displacement Eraser",
183 ""},
185 "DISPLACEMENT_SMEAR",
186 0,
187 "Multires Displacement Smear",
188 ""},
189 {SCULPT_BRUSH_TYPE_PAINT, "PAINT", 0, "Paint", ""},
190 {SCULPT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
191 {SCULPT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", ""},
192 {0, nullptr, 0, nullptr, nullptr},
193};
194
196 {VPAINT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
197 {VPAINT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", ""},
198 {VPAINT_BRUSH_TYPE_AVERAGE, "AVERAGE", 0, "Average", ""},
199 {VPAINT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
200 {0, nullptr, 0, nullptr, nullptr},
201};
202
204 {WPAINT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
205 {WPAINT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", ""},
206 {WPAINT_BRUSH_TYPE_AVERAGE, "AVERAGE", 0, "Average", ""},
207 {WPAINT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
208 {0, nullptr, 0, nullptr, nullptr},
209};
210
212 {IMAGE_PAINT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
213 {IMAGE_PAINT_BRUSH_TYPE_SOFTEN, "SOFTEN", 0, "Soften", ""},
214 {IMAGE_PAINT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
215 {IMAGE_PAINT_BRUSH_TYPE_CLONE, "CLONE", 0, "Clone", ""},
216 {IMAGE_PAINT_BRUSH_TYPE_FILL, "FILL", 0, "Fill", ""},
217 {IMAGE_PAINT_BRUSH_TYPE_MASK, "MASK", 0, "Mask", ""},
218 {0, nullptr, 0, nullptr, nullptr},
219};
220
223 "DRAW",
224 ICON_STROKE,
225 "Draw",
226 "The brush is of type used for drawing strokes"},
228 "FILL",
229 ICON_COLOR,
230 "Fill",
231 "The brush is of type used for filling areas"},
233 "ERASE",
234 ICON_PANEL_CLOSE,
235 "Erase",
236 "The brush is used for erasing strokes"},
237 {GPAINT_BRUSH_TYPE_TINT, "TINT", 0, "Tint", "The brush is of type used for tinting strokes"},
238 {0, nullptr, 0, nullptr, nullptr},
239};
240
242 {GPVERTEX_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", "Paint a color on stroke points"},
244 "BLUR",
245 0,
246 "Blur",
247 "Smooth out the colors of adjacent stroke points"},
249 "AVERAGE",
250 0,
251 "Average",
252 "Smooth out colors with the average color under the brush"},
254 "SMEAR",
255 0,
256 "Smear",
257 "Smudge colors by grabbing and dragging them"},
259 "REPLACE",
260 0,
261 "Replace",
262 "Replace the color of stroke points that already have a color applied"},
263 {0, nullptr, 0, nullptr, nullptr},
264};
265
267 {GPSCULPT_BRUSH_TYPE_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth stroke points"},
268 {GPSCULPT_BRUSH_TYPE_THICKNESS, "THICKNESS", 0, "Thickness", "Adjust thickness of strokes"},
269 {GPSCULPT_BRUSH_TYPE_STRENGTH, "STRENGTH", 0, "Strength", "Adjust color strength of strokes"},
271 "RANDOMIZE",
272 0,
273 "Randomize",
274 "Introduce jitter/randomness into strokes"},
276 "GRAB",
277 0,
278 "Grab",
279 "Translate the set of points initially within the brush circle"},
281 "PUSH",
282 0,
283 "Push",
284 "Move points out of the way, as if combing them"},
286 "TWIST",
287 0,
288 "Twist",
289 "Rotate points around the midpoint of the brush"},
291 "PINCH",
292 0,
293 "Pinch",
294 "Pull points towards the midpoint of the brush"},
296 "CLONE",
297 0,
298 "Clone",
299 "Paste copies of the strokes stored on the internal clipboard"},
300 {0, nullptr, 0, nullptr, nullptr}};
301
303 {GPWEIGHT_BRUSH_TYPE_DRAW, "WEIGHT", 0, "Weight", "Paint weight in active vertex group"},
304 {GPWEIGHT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", "Blur weight in active vertex group"},
306 "AVERAGE",
307 0,
308 "Average",
309 "Average weight in active vertex group"},
310 {GPWEIGHT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", "Smear weight in active vertex group"},
311 {0, nullptr, 0, nullptr, nullptr},
312};
313
315 {CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT, "SELECTION_PAINT", 0, "Paint Selection", ""},
317 {CURVES_SCULPT_BRUSH_TYPE_ADD, "ADD", 0, "Add", ""},
318 {CURVES_SCULPT_BRUSH_TYPE_DELETE, "DELETE", 0, "Delete", ""},
319 {CURVES_SCULPT_BRUSH_TYPE_DENSITY, "DENSITY", 0, "Density", ""},
321 {CURVES_SCULPT_BRUSH_TYPE_COMB, "COMB", 0, "Comb", ""},
322 {CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""},
323 {CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK, "GROW_SHRINK", 0, "Grow / Shrink", ""},
324 {CURVES_SCULPT_BRUSH_TYPE_CUT, "CUT", 0, "Cut", ""},
325 {CURVES_SCULPT_BRUSH_TYPE_PINCH, "PINCH", 0, "Pinch", ""},
326 {CURVES_SCULPT_BRUSH_TYPE_PUFF, "PUFF", 0, "Puff", ""},
327 {CURVES_SCULPT_BRUSH_TYPE_SMOOTH, "SMOOTH", 0, "Smooth", ""},
328 {CURVES_SCULPT_BRUSH_TYPE_SLIDE, "SLIDE", 0, "Slide", ""},
329 {0, nullptr, 0, nullptr, nullptr},
330};
331
332#ifndef RNA_RUNTIME
335 "SOFT",
336 0,
337 "Dissolve",
338 "Erase strokes, fading their points strength and thickness"},
339 {GP_BRUSH_ERASER_HARD, "HARD", 0, "Point", "Erase stroke points"},
340 {GP_BRUSH_ERASER_STROKE, "STROKE", 0, "Stroke", "Erase entire strokes"},
341 {0, nullptr, 0, nullptr, nullptr},
342};
343
346 "BOTH",
347 0,
348 "All",
349 "Use both visible strokes and edit lines as fill boundary limits"},
350 {GP_FILL_DMODE_STROKE, "STROKE", 0, "Strokes", "Use visible strokes as fill boundary limits"},
351 {GP_FILL_DMODE_CONTROL, "CONTROL", 0, "Edit Lines", "Use edit lines as fill boundary limits"},
352 {0, nullptr, 0, nullptr, nullptr}};
353
355 {GP_FILL_EMODE_EXTEND, "EXTEND", 0, "Extend", "Extend strokes in straight lines"},
356 {GP_FILL_EMODE_RADIUS, "RADIUS", 0, "Radius", "Connect endpoints that are close together"},
357 {0, nullptr, 0, nullptr, nullptr}};
358
360 {GP_FILL_GPLMODE_VISIBLE, "VISIBLE", 0, "Visible", "Visible layers"},
361 {GP_FILL_GPLMODE_ACTIVE, "ACTIVE", 0, "Active", "Only active layer"},
362 {GP_FILL_GPLMODE_ABOVE, "ABOVE", 0, "Layer Above", "Layer above active"},
363 {GP_FILL_GPLMODE_BELOW, "BELOW", 0, "Layer Below", "Layer below active"},
364 {GP_FILL_GPLMODE_ALL_ABOVE, "ALL_ABOVE", 0, "All Above", "All layers above active"},
365 {GP_FILL_GPLMODE_ALL_BELOW, "ALL_BELOW", 0, "All Below", "All layers below active"},
366 {0, nullptr, 0, nullptr, nullptr}};
367
369 {0, "NORMAL", ICON_ADD, "Normal", "Fill internal area"},
370 {BRUSH_DIR_IN, "INVERT", ICON_REMOVE, "Inverted", "Fill inverted area"},
371 {0, nullptr, 0, nullptr, nullptr},
372};
373
375 {GP_FILL_SOLVER_DELAUNAY, "DELAUNAY", 0, "Delaunay", "Use the exact geometry to create fills"},
376 {GP_FILL_SOLVER_PIXEL, "PIXEL", 0, "Pixel", "Use pixel based flooding to create fills"},
377 {0, nullptr, 0, nullptr, nullptr}};
378
380 {GP_BRUSH_MODE_ACTIVE, "ACTIVE", 0, "Active", "Use current mode"},
381 {GP_BRUSH_MODE_MATERIAL, "MATERIAL", 0, "Material", "Use always material mode"},
382 {GP_BRUSH_MODE_VERTEXCOLOR, "VERTEXCOLOR", 0, "Vertex Color", "Use always Vertex Color mode"},
383 {0, nullptr, 0, nullptr, nullptr}};
384
385#endif
386
387} // namespace blender
388#ifdef RNA_RUNTIME
389
390# include "DNA_material_types.h"
391
392# include "RNA_access.hh"
393
394# include "BKE_brush.hh"
395# include "BKE_colorband.hh"
396# include "BKE_context.hh"
397# include "BKE_grease_pencil.hh"
398# include "BKE_icons.hh"
399# include "BKE_layer.hh"
400# include "BKE_material.hh"
401# include "BKE_paint.hh"
402# include "BKE_paint_types.hh"
403# include "BKE_preview_image.hh"
404
405# include "WM_api.hh"
406
407# define GPENCIL_USE_VERTEX_COLOR(toolsettings) \
408 (((toolsettings)->gp_paint->mode == GPPAINT_FLAG_USE_VERTEXCOLOR))
409
410namespace blender {
411
412static bool rna_TextureCapabilities_has_random_texture_angle_get(PointerRNA *ptr)
413{
414 MTex *mtex = static_cast<MTex *>(ptr->data);
415 return ELEM(mtex->brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_AREA, MTEX_MAP_MODE_RANDOM);
416}
417
418static bool rna_TextureCapabilities_has_texture_angle_get(PointerRNA *ptr)
419{
420 MTex *mtex = static_cast<MTex *>(ptr->data);
421 return mtex->brush_map_mode != MTEX_MAP_MODE_3D;
422}
423
424static bool rna_TextureCapabilities_has_texture_angle_source_get(PointerRNA *ptr)
425{
426 MTex *mtex = static_cast<MTex *>(ptr->data);
427 return ELEM(mtex->brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_AREA, MTEX_MAP_MODE_RANDOM);
428}
429
430static bool rna_BrushCapabilities_has_overlay_get(PointerRNA *ptr)
431{
432 Brush *br = static_cast<Brush *>(ptr->data);
433 return ELEM(
435}
436
437static bool rna_BrushCapabilities_has_random_texture_angle_get(PointerRNA *ptr)
438{
439 Brush *br = static_cast<Brush *>(ptr->data);
440 return !(br->stroke_method == BRUSH_STROKE_ANCHORED);
441}
442
443static bool rna_BrushCapabilities_has_smooth_stroke_get(PointerRNA *ptr)
444{
445 Brush *br = static_cast<Brush *>(ptr->data);
446 return (!(ELEM(br->stroke_method,
451}
452
453static bool rna_BrushCapabilities_has_spacing_get(PointerRNA *ptr)
454{
455 Brush *br = static_cast<Brush *>(ptr->data);
456 return (!(br->stroke_method == BRUSH_STROKE_ANCHORED));
457}
458
459static bool rna_BrushCapabilitiesSculpt_has_accumulate_get(PointerRNA *ptr)
460{
461 const Brush *br = static_cast<const Brush *>(ptr->data);
463}
464
465static bool rna_BrushCapabilitiesSculpt_has_topology_rake_get(PointerRNA *ptr)
466{
467 const Brush *br = static_cast<const Brush *>(ptr->data);
469}
470
471static bool rna_BrushCapabilitiesSculpt_has_auto_smooth_get(PointerRNA *ptr)
472{
473 const Brush *br = static_cast<const Brush *>(ptr->data);
475}
476
477static bool rna_BrushCapabilitiesSculpt_has_tip_roundness_get(PointerRNA *ptr)
478{
479 const Brush *br = static_cast<const Brush *>(ptr->data);
481}
482
483static bool rna_BrushCapabilitiesSculpt_has_hardness_get(PointerRNA *ptr)
484{
485 const Brush *br = static_cast<const Brush *>(ptr->data);
487}
488
489static bool rna_BrushCapabilitiesSculpt_has_height_get(PointerRNA *ptr)
490{
491 const Brush *br = static_cast<const Brush *>(ptr->data);
492 return bke::brush::supports_height(*br);
493}
494
495static bool rna_BrushCapabilitiesSculpt_has_plane_height_get(PointerRNA *ptr)
496{
497 const Brush *br = static_cast<const Brush *>(ptr->data);
499}
500
501static bool rna_BrushCapabilitiesSculpt_has_plane_depth_get(PointerRNA *ptr)
502{
503 const Brush *br = static_cast<const Brush *>(ptr->data);
505}
506
507static bool rna_BrushCapabilitiesSculpt_has_jitter_get(PointerRNA *ptr)
508{
509 const Brush *br = static_cast<const Brush *>(ptr->data);
510 return bke::brush::supports_jitter(*br);
511}
512
513static bool rna_BrushCapabilitiesSculpt_has_normal_weight_get(PointerRNA *ptr)
514{
515 const Brush *br = static_cast<const Brush *>(ptr->data);
517}
518
519static bool rna_BrushCapabilitiesSculpt_has_rake_factor_get(PointerRNA *ptr)
520{
521 const Brush *br = static_cast<const Brush *>(ptr->data);
523}
524
525static bool rna_BrushCapabilitiesSculpt_has_persistence_get(PointerRNA *ptr)
526{
527 const Brush *br = static_cast<const Brush *>(ptr->data);
529}
530
531static bool rna_BrushCapabilitiesSculpt_has_pinch_factor_get(PointerRNA *ptr)
532{
533 const Brush *br = static_cast<const Brush *>(ptr->data);
535}
536
537static bool rna_BrushCapabilitiesSculpt_has_plane_offset_get(PointerRNA *ptr)
538{
539 const Brush *br = static_cast<const Brush *>(ptr->data);
541}
542
543static bool rna_BrushCapabilitiesSculpt_has_random_texture_angle_get(PointerRNA *ptr)
544{
545 const Brush *br = static_cast<const Brush *>(ptr->data);
547}
548
549static bool rna_BrushCapabilitiesSculpt_has_sculpt_plane_get(PointerRNA *ptr)
550{
551 const Brush *br = static_cast<const Brush *>(ptr->data);
553}
554
555static bool rna_BrushCapabilitiesSculpt_has_color_get(PointerRNA *ptr)
556{
557 const Brush *br = static_cast<const Brush *>(ptr->data);
558 return bke::brush::supports_color(*br);
559}
560
561static bool rna_BrushCapabilitiesSculpt_has_secondary_color_get(PointerRNA *ptr)
562{
563 const Brush *br = static_cast<const Brush *>(ptr->data);
565}
566
567static bool rna_BrushCapabilitiesSculpt_has_smooth_stroke_get(PointerRNA *ptr)
568{
569 const Brush *br = static_cast<const Brush *>(ptr->data);
571}
572
573static bool rna_BrushCapabilitiesSculpt_has_space_attenuation_get(PointerRNA *ptr)
574{
575 const Brush *br = static_cast<const Brush *>(ptr->data);
577}
578
579static bool rna_BrushCapabilitiesSculpt_has_strength_pressure_get(PointerRNA *ptr)
580{
581 const Brush *br = static_cast<const Brush *>(ptr->data);
583}
584
585static bool rna_BrushCapabilitiesSculpt_has_size_pressure_get(PointerRNA *ptr)
586{
587 const Brush *br = static_cast<const Brush *>(ptr->data);
589}
590
591static bool rna_BrushCapabilitiesSculpt_has_auto_smooth_pressure_get(PointerRNA *ptr)
592{
593 const Brush *br = static_cast<const Brush *>(ptr->data);
595}
596
597static bool rna_BrushCapabilitiesSculpt_has_normal_radius_get(PointerRNA *ptr)
598{
599 const Brush *br = static_cast<const Brush *>(ptr->data);
601}
602
603static bool rna_BrushCapabilitiesSculpt_has_hardness_pressure_get(PointerRNA *ptr)
604{
605 const Brush *br = static_cast<const Brush *>(ptr->data);
607}
608
609static bool rna_BrushCapabilitiesSculpt_has_direction_get(PointerRNA *ptr)
610{
611 const Brush *br = static_cast<const Brush *>(ptr->data);
613}
614
615static bool rna_BrushCapabilitiesSculpt_has_gravity_get(PointerRNA *ptr)
616{
617 const Brush *br = static_cast<const Brush *>(ptr->data);
619}
620
621static bool rna_BrushCapabilitiesSculpt_has_tilt_get(PointerRNA *ptr)
622{
623 const Brush *br = static_cast<const Brush *>(ptr->data);
624 return bke::brush::supports_tilt(*br);
625}
626
627static bool rna_BrushCapabilitiesSculpt_has_dyntopo_get(PointerRNA *ptr)
628{
629 const Brush *br = static_cast<const Brush *>(ptr->data);
631}
632
633static bool rna_BrushCapabilitiesImagePaint_has_accumulate_get(PointerRNA *ptr)
634{
635 /* only support for draw brush */
636 Brush *br = static_cast<Brush *>(ptr->data);
637
638 return (ELEM(br->stroke_method,
642 (br->image_brush_type == IMAGE_PAINT_BRUSH_TYPE_SOFTEN) ||
643 (br->image_brush_type == IMAGE_PAINT_BRUSH_TYPE_SMEAR) ||
644 (br->image_brush_type == IMAGE_PAINT_BRUSH_TYPE_FILL) ||
645 (br->mtex.tex && !ELEM(br->mtex.brush_map_mode,
649 false :
650 true;
651}
652
653static bool rna_BrushCapabilitiesImagePaint_has_radius_get(PointerRNA *ptr)
654{
655 /* only support for draw brush */
656 Brush *br = static_cast<Brush *>(ptr->data);
657
658 return (br->image_brush_type != IMAGE_PAINT_BRUSH_TYPE_FILL);
659}
660
661static bool rna_BrushCapabilitiesImagePaint_has_space_attenuation_get(PointerRNA *ptr)
662{
663 Brush *br = static_cast<Brush *>(ptr->data);
664 return (ELEM(br->stroke_method, BRUSH_STROKE_SPACE, BRUSH_STROKE_LINE, BRUSH_STROKE_CURVE)) &&
666}
667
668static bool rna_BrushCapabilitiesImagePaint_has_color_get(PointerRNA *ptr)
669{
670 Brush *br = static_cast<Brush *>(ptr->data);
671 return ELEM(br->image_brush_type, IMAGE_PAINT_BRUSH_TYPE_DRAW, IMAGE_PAINT_BRUSH_TYPE_FILL);
672}
673
674static bool rna_BrushCapabilitiesVertexPaint_has_color_get(PointerRNA *ptr)
675{
676 Brush *br = static_cast<Brush *>(ptr->data);
677 return ELEM(br->vertex_brush_type, VPAINT_BRUSH_TYPE_DRAW);
678}
679
680static bool rna_BrushCapabilitiesWeightPaint_has_weight_get(PointerRNA *ptr)
681{
682 Brush *br = static_cast<Brush *>(ptr->data);
683 return ELEM(br->weight_brush_type, WPAINT_BRUSH_TYPE_DRAW);
684}
685
686static PointerRNA rna_Sculpt_brush_capabilities_get(PointerRNA *ptr)
687{
688 BLI_assert(ptr->owner_id == ptr->data);
689 return RNA_pointer_create_with_parent(*ptr, RNA_BrushCapabilitiesSculpt, ptr->data);
690}
691
692static PointerRNA rna_Imapaint_brush_capabilities_get(PointerRNA *ptr)
693{
694 BLI_assert(ptr->owner_id == ptr->data);
695 return RNA_pointer_create_with_parent(*ptr, RNA_BrushCapabilitiesImagePaint, ptr->data);
696}
697
698static PointerRNA rna_Vertexpaint_brush_capabilities_get(PointerRNA *ptr)
699{
700 BLI_assert(ptr->owner_id == ptr->data);
701 return RNA_pointer_create_with_parent(*ptr, RNA_BrushCapabilitiesVertexPaint, ptr->data);
702}
703
704static PointerRNA rna_Weightpaint_brush_capabilities_get(PointerRNA *ptr)
705{
706 BLI_assert(ptr->owner_id == ptr->data);
707 return RNA_pointer_create_with_parent(*ptr, RNA_BrushCapabilitiesWeightPaint, ptr->data);
708}
709
710static PointerRNA rna_Brush_capabilities_get(PointerRNA *ptr)
711{
712 BLI_assert(ptr->owner_id == ptr->data);
713 return RNA_pointer_create_with_parent(*ptr, RNA_BrushCapabilities, ptr->data);
714}
715
716static void rna_Brush_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
717{
718 Brush *br = static_cast<Brush *>(ptr->data);
721 // WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, nullptr);
722}
723
724static void rna_Brush_color_update(Main *bmain, Scene *scene, PointerRNA *ptr)
725{
726 Brush *br = static_cast<Brush *>(ptr->data);
727 rna_Brush_update(bmain, scene, ptr);
729}
730
731static void rna_Brush_material_update(bContext * /*C*/, PointerRNA *ptr)
732{
733 Brush *br = static_cast<Brush *>(ptr->data);
735 /* number of material users changed */
737}
738
739static void rna_Brush_main_tex_update(bContext *C, PointerRNA *ptr)
740{
741 Main *bmain = CTX_data_main(C);
742 Scene *scene = CTX_data_scene(C);
743 Brush *br = static_cast<Brush *>(ptr->data);
744 bke::paint::invalidate_overlay_tex(*scene, br->mtex.tex);
745 rna_Brush_update(bmain, scene, ptr);
746}
747
748static void rna_Brush_secondary_tex_update(bContext *C, PointerRNA *ptr)
749{
750 Main *bmain = CTX_data_main(C);
751 Scene *scene = CTX_data_scene(C);
752 Brush *br = static_cast<Brush *>(ptr->data);
753 bke::paint::invalidate_overlay_tex(*scene, br->mask_mtex.tex);
754 rna_Brush_update(bmain, scene, ptr);
755}
756
757static void rna_Brush_size_update(Main *bmain, Scene *scene, PointerRNA *ptr)
758{
760 rna_Brush_update(bmain, scene, ptr);
761}
762
763static void rna_Brush_stroke_update(Main *bmain, Scene *scene, PointerRNA *ptr)
764{
766 rna_Brush_update(bmain, scene, ptr);
767}
768
769static void rna_TextureSlot_brush_angle_update(bContext *C, PointerRNA *ptr)
770{
771 Scene *scene = CTX_data_scene(C);
772 MTex *mtex = static_cast<MTex *>(ptr->data);
773 /* skip invalidation of overlay for stencil mode */
774 if (mtex->brush_map_mode != MTEX_MAP_MODE_STENCIL) {
775 bke::paint::invalidate_overlay_tex(*scene, mtex->tex);
776 }
777
779}
780
781static void rna_Brush_set_size(PointerRNA *ptr, int value)
782{
783 Brush *brush = static_cast<Brush *>(ptr->data);
784
785 /* scale unprojected size so it stays consistent with brush size */
786 BKE_brush_scale_unprojected_size(&brush->unprojected_size, value, brush->size);
787 brush->size = value;
788}
789
790static void rna_Brush_use_gradient_set(PointerRNA *ptr, int value)
791{
792 Brush *br = static_cast<Brush *>(ptr->data);
793
794 if (value & BRUSH_USE_GRADIENT) {
795 br->flag |= BRUSH_USE_GRADIENT;
796 }
797 else {
798 br->flag &= ~BRUSH_USE_GRADIENT;
799 }
800
801 if ((br->flag & BRUSH_USE_GRADIENT) && br->gradient == nullptr) {
802 br->gradient = BKE_colorband_add(true);
803 }
804}
805
806static void rna_Brush_set_unprojected_size(PointerRNA *ptr, float value)
807{
808 Brush *brush = static_cast<Brush *>(ptr->data);
809
810 /* scale brush size so it stays consistent with unprojected_size */
811 BKE_brush_scale_size(&brush->size, value, brush->unprojected_size);
812 brush->unprojected_size = value;
813}
814
815static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C,
816 PointerRNA *ptr,
817 PropertyRNA * /*prop*/,
818 bool * /*r_free*/)
819{
820 if (C == nullptr) {
822 }
823
825
826 /* sculpt mode */
827 static const EnumPropertyItem prop_smooth_direction_items[] = {
828 {0,
829 "SMOOTH",
830 ICON_ADD,
832 N_("Smooth the surface")},
834 "ENHANCE_DETAILS",
835 ICON_REMOVE,
836 CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Enhance Details"),
837 N_("Enhance the surface detail")},
838 {0, nullptr, 0, nullptr, nullptr},
839 };
840
841 static const EnumPropertyItem prop_pinch_magnify_items[] = {
843 "MAGNIFY",
844 ICON_ADD,
846 N_("Subtract effect of brush")},
847 {0,
848 "PINCH",
849 ICON_REMOVE,
851 N_("Add effect of brush")},
852 {0, nullptr, 0, nullptr, nullptr},
853 };
854
855 static const EnumPropertyItem prop_inflate_deflate_items[] = {
856 {0,
857 "INFLATE",
858 ICON_ADD,
860 N_("Add effect of brush")},
862 "DEFLATE",
863 ICON_REMOVE,
865 N_("Subtract effect of brush")},
866 {0, nullptr, 0, nullptr, nullptr},
867 };
868
869 /* texture paint mode */
870 static const EnumPropertyItem prop_soften_sharpen_items[] = {
872 "SHARPEN",
873 ICON_ADD,
875 N_("Sharpen effect of brush")},
876 {0,
877 "SOFTEN",
878 ICON_REMOVE,
880 N_("Blur effect of brush")},
881 {0, nullptr, 0, nullptr, nullptr},
882 };
883
884 /* gpencil sculpt */
885 static const EnumPropertyItem prop_pinch_items[] = {
886 {0, "ADD", ICON_ADD, CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Pinch"), N_("Add effect of brush")},
888 "SUBTRACT",
889 ICON_REMOVE,
891 N_("Subtract effect of brush")},
892 {0, nullptr, 0, nullptr, nullptr},
893 };
894 static const EnumPropertyItem prop_twist_items[] = {
895 {0,
896 "ADD",
897 ICON_ADD,
898 CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Counter-Clockwise"),
899 N_("Add effect of brush")},
901 "SUBTRACT",
902 ICON_REMOVE,
903 CTX_N_(BLT_I18NCONTEXT_ID_BRUSH, "Clockwise"),
904 N_("Subtract effect of brush")},
905 {0, nullptr, 0, nullptr, nullptr},
906 };
907
908 Brush *me = static_cast<Brush *>(ptr->data);
909
910 switch (mode) {
912 switch (me->sculpt_brush_type) {
924 return prop_smooth_direction_items;
926 switch (BrushMaskTool(me->mask_tool)) {
927 case BRUSH_MASK_DRAW:
929
932
933 default:
935 }
936
938 return prop_pinch_magnify_items;
939
941 return prop_inflate_deflate_items;
942
943 default:
945 }
946
949 switch (me->image_brush_type) {
951 return prop_soften_sharpen_items;
952
953 default:
955 }
957 switch (me->curves_sculpt_brush_type) {
962 default:
964 }
966 switch (me->gpencil_sculpt_brush_type) {
971 return prop_twist_items;
973 return prop_pinch_items;
974 default:
976 }
978 switch (me->gpencil_weight_brush_type) {
981 default:
983 }
984 default:
986 }
987}
988
989static const EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C,
990 PointerRNA * /*ptr*/,
991 PropertyRNA * /*prop*/,
992 bool * /*r_free*/)
993{
995
996 static const EnumPropertyItem brush_stroke_method_items[] = {
997 {BRUSH_STROKE_DOTS, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
999 "SPACE",
1000 0,
1001 "Space",
1002 "Limit brush application to the distance specified by spacing"},
1004 "AIRBRUSH",
1005 0,
1006 "Airbrush",
1007 "Keep applying paint effect while holding mouse (spray)"},
1009 "LINE",
1010 0,
1011 "Line",
1012 "Draw a line with dabs separated according to spacing"},
1014 "CURVE",
1015 0,
1016 "Curve",
1017 "Define the stroke curve with a Bézier curve. Dabs are separated according to spacing."},
1018 {0, nullptr, 0, nullptr, nullptr},
1019 };
1020
1021 switch (mode) {
1022 case PaintMode::Sculpt:
1026
1027 default:
1028 return brush_stroke_method_items;
1029 }
1030}
1031
1032/* Grease Pencil Drawing Brushes Settings */
1033static std::optional<std::string> rna_BrushGpencilSettings_path(const PointerRNA * /*ptr*/)
1034{
1035 return "gpencil_settings";
1036}
1037
1038static void rna_BrushGpencilSettings_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
1039{
1040 Brush *br = reinterpret_cast<Brush *>(ptr->owner_id);
1041 /* Synchronize the general randomization flag with the brush color jitter flag */
1042 if (br->gpencil_settings->flag & GP_BRUSH_GROUP_RANDOM) {
1043 br->flag2 |= BRUSH_JITTER_COLOR;
1044 }
1045 else {
1046 br->flag2 &= ~BRUSH_JITTER_COLOR;
1047 }
1049}
1050
1051static void rna_BrushGpencilSettings_use_material_pin_update(bContext *C, PointerRNA *ptr)
1052{
1053 const Main *bmain = CTX_data_main(C);
1054 const Scene *scene = CTX_data_scene(C);
1055 ViewLayer *view_layer = CTX_data_view_layer(C);
1056 BKE_view_layer_synced_ensure(*bmain, scene, view_layer);
1057 Object *ob = BKE_view_layer_active_object_get(view_layer);
1058 Brush *brush = reinterpret_cast<Brush *>(ptr->owner_id);
1059
1060 if (brush->gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED) {
1061 Material *material = BKE_object_material_get(ob, ob->actcol);
1063 }
1064 else {
1066 }
1067
1068 rna_BrushGpencilSettings_update(CTX_data_main(C), CTX_data_scene(C), ptr);
1069 /* number of material users changed */
1071}
1072
1073static bool rna_BrushGpencilSettings_material_poll(PointerRNA * /*ptr*/, PointerRNA value)
1074{
1075 Material *ma = static_cast<Material *>(value.data);
1076
1077 /* GP materials only */
1078 return (ma->gp_style != nullptr);
1079}
1080
1081static bool rna_GPencilBrush_pin_mode_get(PointerRNA *ptr)
1082{
1083 Brush *brush = reinterpret_cast<Brush *>(ptr->owner_id);
1084 if ((brush != nullptr) && (brush->gpencil_settings != nullptr)) {
1085 return (brush->gpencil_settings->brush_draw_mode != GP_BRUSH_MODE_ACTIVE);
1086 }
1087 return false;
1088}
1089
1090static void rna_GPencilBrush_pin_mode_set(PointerRNA * /*ptr*/, bool /*value*/)
1091{
1092 /* All data is set in update. Keep this function only to avoid RNA compilation errors. */
1093}
1094
1095static void rna_GPencilBrush_pin_mode_update(bContext *C, PointerRNA *ptr)
1096{
1097 Brush *brush = reinterpret_cast<Brush *>(ptr->owner_id);
1098 if ((brush != nullptr) && (brush->gpencil_settings != nullptr)) {
1099 if (brush->gpencil_settings->brush_draw_mode != GP_BRUSH_MODE_ACTIVE) {
1100 /* If not active, means that must be set to off. */
1101 brush->gpencil_settings->brush_draw_mode = GP_BRUSH_MODE_ACTIVE;
1102 }
1103 else {
1105 brush->gpencil_settings->brush_draw_mode = GPENCIL_USE_VERTEX_COLOR(ts) ?
1108 }
1109 }
1110 rna_BrushGpencilSettings_update(CTX_data_main(C), CTX_data_scene(C), ptr);
1111}
1112
1113static void rna_BrushCurvesSculptSettings_update(Main * /*bmain*/,
1114 Scene * /*scene*/,
1115 PointerRNA *ptr)
1116{
1117 Brush *br = reinterpret_cast<Brush *>(ptr->owner_id);
1119}
1120
1121static const EnumPropertyItem *rna_BrushTextureSlot_map_mode_itemf(bContext *C,
1122 PointerRNA * /*ptr*/,
1123 PropertyRNA * /*prop*/,
1124 bool * /*r_free*/)
1125{
1126 static const EnumPropertyItem rna_enum_brush_texture_slot_map_texture_mode_items[] = {
1127 {MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
1128 {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
1129 {MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
1130 {MTEX_MAP_MODE_RANDOM, "RANDOM", 0, "Random", ""},
1131 {MTEX_MAP_MODE_STENCIL, "STENCIL", 0, "Stencil", ""},
1132 {0, nullptr, 0, nullptr, nullptr},
1133 };
1134
1135 if (C == nullptr) {
1137 }
1138
1139# define rna_enum_brush_texture_slot_map_sculpt_mode_items \
1140 rna_enum_brush_texture_slot_map_all_mode_items;
1141
1143 if (mode == PaintMode::Sculpt) {
1144 return rna_enum_brush_texture_slot_map_sculpt_mode_items;
1145 }
1146 return rna_enum_brush_texture_slot_map_texture_mode_items;
1147
1148# undef rna_enum_brush_texture_slot_map_sculpt_mode_items
1149}
1150
1151static std::optional<std::string> rna_BrushCurvesSculptSettings_path(const PointerRNA * /*ptr*/)
1152{
1153 return "curves_sculpt_settings";
1154}
1155
1156} // namespace blender
1157
1158#else
1159
1160namespace blender {
1161
1163{
1164 StructRNA *srna;
1165 PropertyRNA *prop;
1166
1167 static const EnumPropertyItem prop_mask_paint_map_mode_items[] = {
1168 {MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
1169 {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
1170 {MTEX_MAP_MODE_RANDOM, "RANDOM", 0, "Random", ""},
1171 {MTEX_MAP_MODE_STENCIL, "STENCIL", 0, "Stencil", ""},
1172 {0, nullptr, 0, nullptr, nullptr},
1173 };
1174
1175# define TEXTURE_CAPABILITY(prop_name_, ui_name_) \
1176 prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
1177 RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
1178 RNA_def_property_boolean_funcs(prop, "rna_TextureCapabilities_" #prop_name_ "_get", nullptr); \
1179 RNA_def_property_ui_text(prop, ui_name_, nullptr)
1180
1181 srna = RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
1182 RNA_def_struct_sdna(srna, "MTex");
1184 srna, "Brush Texture Slot", "Texture slot for textures in a Brush data-block");
1185
1186 prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
1187 RNA_def_property_float_sdna(prop, nullptr, "rot");
1188 RNA_def_property_range(prop, 0, M_PI * 2);
1189 RNA_def_property_ui_text(prop, "Angle", "Brush texture rotation");
1191 RNA_def_property_update(prop, 0, "rna_TextureSlot_brush_angle_update");
1192
1193 prop = RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE);
1194 RNA_def_property_enum_sdna(prop, nullptr, "brush_map_mode");
1196 RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_BrushTextureSlot_map_mode_itemf");
1197 RNA_def_property_ui_text(prop, "Mode", "");
1199 RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
1200
1201 prop = RNA_def_property(srna, "mask_map_mode", PROP_ENUM, PROP_NONE);
1202 RNA_def_property_enum_sdna(prop, nullptr, "brush_map_mode");
1203 RNA_def_property_enum_items(prop, prop_mask_paint_map_mode_items);
1204 RNA_def_property_ui_text(prop, "Mode", "");
1206 RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
1207
1208 prop = RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
1209 RNA_def_property_boolean_sdna(prop, nullptr, "brush_angle_mode", MTEX_ANGLE_RAKE);
1210 RNA_def_property_ui_text(prop, "Rake", "");
1212 RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
1213
1214 prop = RNA_def_property(srna, "use_random", PROP_BOOLEAN, PROP_NONE);
1215 RNA_def_property_boolean_sdna(prop, nullptr, "brush_angle_mode", MTEX_ANGLE_RANDOM);
1216 RNA_def_property_ui_text(prop, "Random", "");
1218 RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
1219
1220 prop = RNA_def_property(srna, "random_angle", PROP_FLOAT, PROP_ANGLE);
1221 RNA_def_property_range(prop, 0, M_PI * 2);
1222 RNA_def_property_ui_text(prop, "Random Angle", "Brush texture random angle");
1224 RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
1225
1226 TEXTURE_CAPABILITY(has_texture_angle_source, "Has Texture Angle Source");
1227 TEXTURE_CAPABILITY(has_random_texture_angle, "Has Random Texture Angle");
1228 TEXTURE_CAPABILITY(has_texture_angle, "Has Texture Angle Source");
1229
1230# undef TEXTURE_CAPABILITY
1231}
1232
1234{
1235 StructRNA *srna;
1236 PropertyRNA *prop;
1237
1238 srna = RNA_def_struct(brna, "BrushCapabilitiesSculpt", nullptr);
1239 RNA_def_struct_sdna(srna, "Brush");
1240 RNA_def_struct_nested(brna, srna, "Brush");
1242 "Sculpt Capabilities",
1243 "Read-only indications of which brush operations "
1244 "are supported by the current sculpt tool");
1245
1246# define SCULPT_BRUSH_CAPABILITY(prop_name_, ui_name_) \
1247 prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
1248 RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
1249 RNA_def_property_boolean_funcs( \
1250 prop, "rna_BrushCapabilitiesSculpt_" #prop_name_ "_get", nullptr); \
1251 RNA_def_property_ui_text(prop, ui_name_, nullptr)
1252
1253 SCULPT_BRUSH_CAPABILITY(has_accumulate, "Has Accumulate");
1254 SCULPT_BRUSH_CAPABILITY(has_auto_smooth, "Has Auto Smooth");
1255 SCULPT_BRUSH_CAPABILITY(has_normal_radius, "Has Normal Radius");
1256 SCULPT_BRUSH_CAPABILITY(has_hardness, "Has Hardness");
1257 SCULPT_BRUSH_CAPABILITY(has_tip_roundness, "Has Tip Roundness");
1258 SCULPT_BRUSH_CAPABILITY(has_topology_rake, "Has Topology Rake");
1259 SCULPT_BRUSH_CAPABILITY(has_height, "Has Height");
1260 SCULPT_BRUSH_CAPABILITY(has_plane_depth, "Has Plane Depth");
1261 SCULPT_BRUSH_CAPABILITY(has_plane_height, "Has Plane Height");
1262 SCULPT_BRUSH_CAPABILITY(has_jitter, "Has Jitter");
1263 SCULPT_BRUSH_CAPABILITY(has_normal_weight, "Has Crease/Pinch Factor");
1264 SCULPT_BRUSH_CAPABILITY(has_rake_factor, "Has Rake Factor");
1265 SCULPT_BRUSH_CAPABILITY(has_persistence, "Has Persistence");
1266 SCULPT_BRUSH_CAPABILITY(has_pinch_factor, "Has Pinch Factor");
1267 SCULPT_BRUSH_CAPABILITY(has_plane_offset, "Has Plane Offset");
1268 SCULPT_BRUSH_CAPABILITY(has_random_texture_angle, "Has Random Texture Angle");
1269 SCULPT_BRUSH_CAPABILITY(has_sculpt_plane, "Has Sculpt Plane");
1270 SCULPT_BRUSH_CAPABILITY(has_color, "Has Color");
1271 SCULPT_BRUSH_CAPABILITY(has_secondary_color, "Has Secondary Color");
1272 SCULPT_BRUSH_CAPABILITY(has_smooth_stroke, "Has Smooth Stroke");
1273 SCULPT_BRUSH_CAPABILITY(has_space_attenuation, "Has Space Attenuation");
1274 SCULPT_BRUSH_CAPABILITY(has_strength_pressure, "Has Strength Pressure");
1275 SCULPT_BRUSH_CAPABILITY(has_size_pressure, "Has Size Pressure");
1276 SCULPT_BRUSH_CAPABILITY(has_auto_smooth_pressure, "Has Auto-Smooth Pressure");
1277 SCULPT_BRUSH_CAPABILITY(has_hardness_pressure, "Has Hardness Pressure");
1278 SCULPT_BRUSH_CAPABILITY(has_direction, "Has Direction");
1279 SCULPT_BRUSH_CAPABILITY(has_gravity, "Has Gravity");
1280 SCULPT_BRUSH_CAPABILITY(has_tilt, "Has Tilt");
1281 SCULPT_BRUSH_CAPABILITY(has_dyntopo, "Has Dyntopo");
1282
1283# undef SCULPT_CAPABILITY
1284}
1285
1287{
1288 StructRNA *srna;
1289 PropertyRNA *prop;
1290
1291 srna = RNA_def_struct(brna, "BrushCapabilities", nullptr);
1292 RNA_def_struct_sdna(srna, "Brush");
1293 RNA_def_struct_nested(brna, srna, "Brush");
1295 srna, "Brush Capabilities", "Read-only indications of supported operations");
1296
1297# define BRUSH_CAPABILITY(prop_name_, ui_name_) \
1298 prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
1299 RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
1300 RNA_def_property_boolean_funcs(prop, "rna_BrushCapabilities_" #prop_name_ "_get", nullptr); \
1301 RNA_def_property_ui_text(prop, ui_name_, nullptr)
1302
1303 BRUSH_CAPABILITY(has_overlay, "Has Overlay");
1304 BRUSH_CAPABILITY(has_random_texture_angle, "Has Random Texture Angle");
1305 BRUSH_CAPABILITY(has_spacing, "Has Spacing");
1306 BRUSH_CAPABILITY(has_smooth_stroke, "Has Smooth Stroke");
1307
1308# undef BRUSH_CAPABILITY
1309}
1310
1312{
1313 StructRNA *srna;
1314 PropertyRNA *prop;
1315
1316 srna = RNA_def_struct(brna, "BrushCapabilitiesImagePaint", nullptr);
1317 RNA_def_struct_sdna(srna, "Brush");
1318 RNA_def_struct_nested(brna, srna, "Brush");
1320 srna, "Image Paint Capabilities", "Read-only indications of supported operations");
1321
1322# define IMAPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_) \
1323 prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
1324 RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
1325 RNA_def_property_boolean_funcs( \
1326 prop, "rna_BrushCapabilitiesImagePaint_" #prop_name_ "_get", nullptr); \
1327 RNA_def_property_ui_text(prop, ui_name_, nullptr)
1328
1329 IMAPAINT_BRUSH_CAPABILITY(has_accumulate, "Has Accumulate");
1330 IMAPAINT_BRUSH_CAPABILITY(has_space_attenuation, "Has Space Attenuation");
1331 IMAPAINT_BRUSH_CAPABILITY(has_radius, "Has Radius");
1332 IMAPAINT_BRUSH_CAPABILITY(has_color, "Has Color");
1333
1334# undef IMAPAINT_BRUSH_CAPABILITY
1335}
1336
1338{
1339 StructRNA *srna;
1340 PropertyRNA *prop;
1341
1342 srna = RNA_def_struct(brna, "BrushCapabilitiesVertexPaint", nullptr);
1343 RNA_def_struct_sdna(srna, "Brush");
1344 RNA_def_struct_nested(brna, srna, "Brush");
1346 srna, "Vertex Paint Capabilities", "Read-only indications of supported operations");
1347
1348# define VPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_) \
1349 prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
1350 RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
1351 RNA_def_property_boolean_funcs( \
1352 prop, "rna_BrushCapabilitiesVertexPaint_" #prop_name_ "_get", nullptr); \
1353 RNA_def_property_ui_text(prop, ui_name_, nullptr)
1354
1355 VPAINT_BRUSH_CAPABILITY(has_color, "Has Color");
1356
1357# undef VPAINT_BRUSH_CAPABILITY
1358}
1359
1361{
1362 StructRNA *srna;
1363 PropertyRNA *prop;
1364
1365 srna = RNA_def_struct(brna, "BrushCapabilitiesWeightPaint", nullptr);
1366 RNA_def_struct_sdna(srna, "Brush");
1367 RNA_def_struct_nested(brna, srna, "Brush");
1369 srna, "Weight Paint Capabilities", "Read-only indications of supported operations");
1370
1371# define WPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_) \
1372 prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
1373 RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
1374 RNA_def_property_boolean_funcs( \
1375 prop, "rna_BrushCapabilitiesWeightPaint_" #prop_name_ "_get", nullptr); \
1376 RNA_def_property_ui_text(prop, ui_name_, nullptr)
1377
1378 WPAINT_BRUSH_CAPABILITY(has_weight, "Has Weight");
1379
1380# undef WPAINT_BRUSH_CAPABILITY
1381}
1382
1384{
1385 StructRNA *srna;
1386 PropertyRNA *prop;
1387
1388 /* modes */
1389 static const EnumPropertyItem gppaint_mode_types_items[] = {
1391 "STROKE",
1392 ICON_GP_DRAW_STROKE,
1393 "Stroke",
1394 "Painting affects only strokes, not fills"},
1396 "FILL",
1397 ICON_GP_DRAW_FILL,
1398 "Fill",
1399 "Painting affects only fills, not strokes"},
1401 "BOTH",
1402 ICON_GP_DRAW_BOTH,
1403 "Both",
1404 "Painting affects both strokes and fills"},
1405 {0, nullptr, 0, nullptr, nullptr},
1406 };
1407
1408 static const EnumPropertyItem rna_enum_gpencil_brush_caps_types_items[] = {
1409 {GP_STROKE_CAP_ROUND, "ROUND", ICON_GP_CAPS_ROUND, "Round", ""},
1410 {GP_STROKE_CAP_FLAT, "FLAT", ICON_GP_CAPS_FLAT, "Flat", ""},
1411 {0, nullptr, 0, nullptr, nullptr},
1412 };
1413
1414 static const EnumPropertyItem rna_enum_gpencil_brush_stroke_type_items[] = {
1415 {GP_BRUSH_USE_STROKE, "STROKE", ICON_GP_DRAW_STROKE, "Stroke", ""},
1416 {GP_BRUSH_USE_FILL, "FILL", ICON_GP_DRAW_FILL, "Fill", ""},
1417 {GP_BRUSH_USE_FILL | GP_BRUSH_USE_STROKE, "BOTH", ICON_GP_DRAW_BOTH, "Both", ""},
1418 {0, nullptr, 0, nullptr, nullptr},
1419 };
1420
1421 srna = RNA_def_struct(brna, "BrushGpencilSettings", nullptr);
1422 RNA_def_struct_sdna(srna, "BrushGpencilSettings");
1423 RNA_def_struct_path_func(srna, "rna_BrushGpencilSettings_path");
1424 RNA_def_struct_ui_text(srna, "Grease Pencil Brush Settings", "Settings for Grease Pencil brush");
1425
1426 /* Strength factor for new strokes */
1427 prop = RNA_def_property(srna, "pen_strength", PROP_FLOAT, PROP_FACTOR);
1428 RNA_def_property_float_sdna(prop, nullptr, "draw_strength");
1429 RNA_def_property_range(prop, 0.0f, 1.0f);
1430 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
1432 prop, "Strength", "Color strength for new strokes (affect alpha factor of color)");
1435 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1436
1437 /* Jitter factor for new strokes */
1438 prop = RNA_def_property(srna, "pen_jitter", PROP_FLOAT, PROP_FACTOR);
1439 RNA_def_property_float_sdna(prop, nullptr, "draw_jitter");
1440 RNA_def_property_range(prop, 0.0f, 100.0f);
1441 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
1442 RNA_def_property_ui_text(prop, "Jitter", "Jitter factor of brush radius for new strokes");
1445 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1446
1447 /* Randomness factor for pressure */
1448 prop = RNA_def_property(srna, "random_pressure", PROP_FLOAT, PROP_FACTOR);
1449 RNA_def_property_float_sdna(prop, nullptr, "draw_random_press");
1450 RNA_def_property_range(prop, 0.0f, 1.0f);
1452 prop, "Pressure Randomness", "Randomness factor for pressure in new strokes");
1454 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1455
1456 /* Randomness factor for strength */
1457 prop = RNA_def_property(srna, "random_strength", PROP_FLOAT, PROP_FACTOR);
1458 RNA_def_property_float_sdna(prop, nullptr, "draw_random_strength");
1459 RNA_def_property_range(prop, 0.0f, 1.0f);
1461 prop, "Strength Randomness", "Randomness factor strength in new strokes");
1463 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1464
1465 /* Angle when brush is full size */
1466 prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
1467 RNA_def_property_float_sdna(prop, nullptr, "draw_angle");
1470 "Angle",
1471 "Direction of the stroke at which brush gives maximal thickness "
1472 "(0" BLI_STR_UTF8_DEGREE_SIGN " for horizontal)");
1474 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1475
1476 /* Factor to change brush size depending of angle */
1477 prop = RNA_def_property(srna, "angle_factor", PROP_FLOAT, PROP_FACTOR);
1478 RNA_def_property_float_sdna(prop, nullptr, "draw_angle_factor");
1479 RNA_def_property_range(prop, 0.0f, 1.0f);
1481 prop,
1482 "Angle Factor",
1483 "Reduce brush thickness by this factor when stroke is perpendicular to 'Angle' direction");
1485 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1486
1487 /* Smoothing factor for new strokes */
1488 prop = RNA_def_property(srna, "pen_smooth_factor", PROP_FLOAT, PROP_NONE);
1489 RNA_def_property_float_sdna(prop, nullptr, "draw_smoothfac");
1490 RNA_def_property_range(prop, 0.0, 2.0);
1491 RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 3);
1493 prop,
1494 "Smooth",
1495 "Amount of smoothing to apply after finish newly created strokes, to reduce jitter/noise");
1498 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1499
1500 /* Iterations of the Smoothing factor */
1501 prop = RNA_def_property(srna, "pen_smooth_steps", PROP_INT, PROP_NONE);
1502 RNA_def_property_int_sdna(prop, nullptr, "draw_smoothlvl");
1503 RNA_def_property_range(prop, 0, 100);
1504 RNA_def_property_ui_text(prop, "Iterations", "Number of times to smooth newly created strokes");
1506 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1507
1508 /* Subdivision level for new strokes */
1509 prop = RNA_def_property(srna, "pen_subdivision_steps", PROP_INT, PROP_NONE);
1510 RNA_def_property_int_sdna(prop, nullptr, "draw_subdivide");
1511 RNA_def_property_range(prop, 0, 3);
1513 prop,
1514 "Subdivision Steps",
1515 "Number of times to subdivide newly created strokes, for less jagged strokes");
1517 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1518
1519 /* Simplify factor */
1520 prop = RNA_def_property(srna, "simplify_factor", PROP_FLOAT, PROP_NONE);
1521 RNA_def_property_float_sdna(prop, nullptr, "simplify_f");
1522 RNA_def_property_range(prop, 0, 100.0);
1523 RNA_def_property_ui_range(prop, 0, 100.0, 1.0f, 3);
1524 RNA_def_property_ui_text(prop, "Simplify", "Factor of Simplify using adaptive algorithm");
1526 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1527
1528 prop = RNA_def_property(srna, "simplify_pixel_threshold", PROP_FLOAT, PROP_PIXEL);
1529 RNA_def_property_float_sdna(prop, nullptr, "simplify_px");
1530 RNA_def_property_range(prop, 0, 10.0);
1531 RNA_def_property_ui_range(prop, 0, 10.0, 1.0f, 1);
1533 prop,
1534 "Simplify",
1535 "Threshold in screen space used for the simplify algorithm. Points within this threshold "
1536 "are treated as if they were in a straight line.");
1538 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1539
1540 /* Curves for pressure */
1541 prop = RNA_def_property(srna, "curve_sensitivity", PROP_POINTER, PROP_NONE);
1542 RNA_def_property_pointer_sdna(prop, nullptr, "curve_sensitivity");
1543 RNA_def_property_struct_type(prop, "CurveMapping");
1544 RNA_def_property_ui_text(prop, "Curve Sensitivity", "Curve used for the sensitivity");
1546 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1547
1548 prop = RNA_def_property(srna, "curve_strength", PROP_POINTER, PROP_NONE);
1549 RNA_def_property_pointer_sdna(prop, nullptr, "curve_strength");
1550 RNA_def_property_struct_type(prop, "CurveMapping");
1551 RNA_def_property_ui_text(prop, "Curve Strength", "Curve used for the strength");
1553 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1554
1555 prop = RNA_def_property(srna, "curve_jitter", PROP_POINTER, PROP_NONE);
1556 RNA_def_property_pointer_sdna(prop, nullptr, "curve_jitter");
1557 RNA_def_property_struct_type(prop, "CurveMapping");
1558 RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect");
1560 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1561
1562 prop = RNA_def_property(srna, "curve_random_pressure", PROP_POINTER, PROP_NONE);
1563 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_pressure");
1564 RNA_def_property_struct_type(prop, "CurveMapping");
1565 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
1567 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1568
1569 prop = RNA_def_property(srna, "curve_random_strength", PROP_POINTER, PROP_NONE);
1570 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_strength");
1571 RNA_def_property_struct_type(prop, "CurveMapping");
1572 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
1574 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1575
1576 prop = RNA_def_property(srna, "curve_random_uv", PROP_POINTER, PROP_NONE);
1577 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_uv");
1578 RNA_def_property_struct_type(prop, "CurveMapping");
1579 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
1581 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1582
1583 prop = RNA_def_property(srna, "curve_random_hue", PROP_POINTER, PROP_NONE);
1584 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_hue");
1585 RNA_def_property_struct_type(prop, "CurveMapping");
1586 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
1588 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1589
1590 prop = RNA_def_property(srna, "curve_random_saturation", PROP_POINTER, PROP_NONE);
1591 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_saturation");
1592 RNA_def_property_struct_type(prop, "CurveMapping");
1593 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
1595 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1596
1597 prop = RNA_def_property(srna, "curve_random_value", PROP_POINTER, PROP_NONE);
1598 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_value");
1599 RNA_def_property_struct_type(prop, "CurveMapping");
1600 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
1602 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1603
1604 /* Fill threshold for transparency. */
1605 prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_FACTOR);
1606 RNA_def_property_float_sdna(prop, nullptr, "fill_threshold");
1607 RNA_def_property_range(prop, 0.0f, 1.0f);
1609 prop, "Threshold", "Threshold to consider color transparent for filling");
1611 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1612
1613 /* fill factor size */
1614 prop = RNA_def_property(srna, "fill_factor", PROP_FLOAT, PROP_NONE);
1615 RNA_def_property_float_sdna(prop, nullptr, "fill_factor");
1618 prop,
1619 "Precision",
1620 "Factor for fill boundary accuracy, higher values are more accurate but slower");
1622 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1623
1624 /* fill simplify steps */
1625 prop = RNA_def_property(srna, "fill_simplify_level", PROP_INT, PROP_NONE);
1626 RNA_def_property_int_sdna(prop, nullptr, "fill_simplylvl");
1627 RNA_def_property_range(prop, 0, 10);
1629 prop, "Simplify", "Number of simplify steps (large values reduce fill accuracy)");
1631 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1632
1633 prop = RNA_def_property(srna, "uv_random", PROP_FLOAT, PROP_FACTOR);
1634 RNA_def_property_float_sdna(prop, nullptr, "uv_random");
1635 RNA_def_property_range(prop, 0.0, 1.0);
1636 RNA_def_property_ui_text(prop, "UV Random", "Random factor for auto-generated UV rotation");
1638 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1639
1640 /* gradient control */
1641 prop = RNA_def_property(srna, "hardness", PROP_FLOAT, PROP_FACTOR);
1642 RNA_def_property_float_sdna(prop, nullptr, "hardness");
1643 RNA_def_property_range(prop, 0.001f, 1.0f);
1646 prop,
1647 "Hardness",
1648 "Gradient from the center of Dot and Box strokes (set to 1 for a solid stroke)");
1650 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1651
1652 /* gradient shape ratio */
1653 prop = RNA_def_property(srna, "aspect", PROP_FLOAT, PROP_XYZ);
1654 RNA_def_property_float_sdna(prop, nullptr, "aspect_ratio");
1655 RNA_def_property_array(prop, 2);
1656 RNA_def_property_range(prop, 0.01f, 1.0f);
1658 RNA_def_property_ui_text(prop, "Aspect", "");
1660 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1661
1662 prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_NONE);
1663 RNA_def_property_int_sdna(prop, nullptr, "input_samples");
1666 prop,
1667 "Input Samples",
1668 "Generated intermediate points for very fast mouse movements (Set to 0 to disable)");
1670 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1671
1672 /* active smooth factor while drawing */
1673 prop = RNA_def_property(srna, "active_smooth_factor", PROP_FLOAT, PROP_FACTOR);
1674 RNA_def_property_float_sdna(prop, nullptr, "active_smooth");
1675 RNA_def_property_range(prop, 0.0f, 1.0f);
1676 RNA_def_property_ui_text(prop, "Active Smooth", "Amount of smoothing while drawing");
1678 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1679
1680 prop = RNA_def_property(srna, "eraser_strength_factor", PROP_FLOAT, PROP_PERCENTAGE);
1681 RNA_def_property_float_sdna(prop, nullptr, "era_strength_f");
1682 RNA_def_property_range(prop, 0.0, 100.0);
1683 RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 1);
1684 RNA_def_property_ui_text(prop, "Affect Stroke Strength", "Amount of erasing for strength");
1686 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1687
1688 prop = RNA_def_property(srna, "eraser_thickness_factor", PROP_FLOAT, PROP_PERCENTAGE);
1689 RNA_def_property_float_sdna(prop, nullptr, "era_thickness_f");
1690 RNA_def_property_range(prop, 0.0, 100.0);
1691 RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 1);
1692 RNA_def_property_ui_text(prop, "Affect Stroke Thickness", "Amount of erasing for thickness");
1694 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1695
1696 /* Mode type. */
1697 prop = RNA_def_property(srna, "vertex_mode", PROP_ENUM, PROP_NONE);
1698 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "vertex_mode");
1699 RNA_def_property_enum_items(prop, gppaint_mode_types_items);
1700 RNA_def_property_ui_text(prop, "Mode Type", "Defines how vertex color affect to the strokes");
1702 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1703
1704 /* Vertex Color mix factor. */
1705 prop = RNA_def_property(srna, "vertex_color_factor", PROP_FLOAT, PROP_FACTOR);
1706 RNA_def_property_float_sdna(prop, nullptr, "vertex_factor");
1707 RNA_def_property_range(prop, 0.0f, 1.0f);
1710 prop, "Vertex Color Factor", "Factor used to mix vertex color to get final color");
1711 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1712
1713 /* Hue randomness. */
1714 prop = RNA_def_property(srna, "random_hue_factor", PROP_FLOAT, PROP_FACTOR);
1715 RNA_def_property_float_sdna(prop, nullptr, "random_hue");
1716 RNA_def_property_range(prop, 0.0f, 1.0f);
1718 RNA_def_property_ui_text(prop, "Hue", "Random factor to modify original hue");
1720
1721 /* Saturation randomness. */
1722 prop = RNA_def_property(srna, "random_saturation_factor", PROP_FLOAT, PROP_FACTOR);
1723 RNA_def_property_float_sdna(prop, nullptr, "random_saturation");
1724 RNA_def_property_range(prop, 0.0f, 1.0f);
1726 RNA_def_property_ui_text(prop, "Saturation", "Random factor to modify original saturation");
1728 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1729
1730 /* Value randomness. */
1731 prop = RNA_def_property(srna, "random_value_factor", PROP_FLOAT, PROP_FACTOR);
1732 RNA_def_property_float_sdna(prop, nullptr, "random_value");
1733 RNA_def_property_range(prop, 0.0f, 1.0f);
1735 RNA_def_property_ui_text(prop, "Value", "Random factor to modify original value");
1737 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1738
1739 /* Factor to extend stroke extremes in Fill brush. */
1740 prop = RNA_def_property(srna, "extend_stroke_factor", PROP_FLOAT, PROP_NONE);
1741 RNA_def_property_float_sdna(prop, nullptr, "fill_extend_fac");
1742 RNA_def_property_range(prop, 0.0f, FLT_MAX);
1743 RNA_def_property_ui_range(prop, 0.0, 10.0f, 0.1, 2);
1746 prop, "Closure Size", "Strokes end extension for closing gaps, use zero to disable");
1748 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1749
1750 prop = RNA_def_property(srna, "fill_extend_mode", PROP_ENUM, PROP_NONE);
1751 RNA_def_property_enum_sdna(prop, nullptr, "fill_extend_mode");
1754 prop, "Closure Mode", "Types of stroke extensions used for closing gaps");
1757 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1758
1759 /* Number of pixels to dilate fill area. Negative values contract the filled area. */
1760 prop = RNA_def_property(srna, "dilate", PROP_INT, PROP_PIXEL);
1761 RNA_def_property_int_sdna(prop, nullptr, "dilate_pixels");
1762 RNA_def_property_range(prop, -40, 40);
1765 prop, "Dilate/Contract", "Number of pixels to expand or contract fill area");
1767 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1768
1769 /* Factor to determine outline external perimeter thickness. */
1770 prop = RNA_def_property(srna, "outline_thickness_factor", PROP_FLOAT, PROP_FACTOR);
1771 RNA_def_property_float_sdna(prop, nullptr, "outline_fac");
1772 RNA_def_property_range(prop, 0.0f, 1.0f);
1775 prop, "Thickness", "Thickness of the outline stroke relative to current brush thickness");
1777 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1778
1779 /* Threshold distance for converting curve types. */
1780 prop = RNA_def_property(srna, "conversion_threshold", PROP_FLOAT, PROP_DISTANCE);
1781 RNA_def_property_float_sdna(prop, nullptr, "conversion_threshold");
1782 RNA_def_property_range(prop, 0.0f, FLT_MAX);
1783 RNA_def_property_float_default(prop, 0.001f);
1784 RNA_def_property_ui_text(prop, "Threshold", "Threshold distance between points for conversion");
1786 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1787
1788 /* Flags */
1789 prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE);
1791 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1792 RNA_def_property_ui_text(prop, "Use Pressure", "Use tablet pressure");
1794 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1795
1796 prop = RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE);
1798 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1800 prop, "Use Pressure Strength", "Use tablet pressure for color strength");
1802 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1803
1804 prop = RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE);
1806 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1807 RNA_def_property_ui_text(prop, "Use Pressure Jitter", "Use tablet pressure for jitter");
1809 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1810
1811 prop = RNA_def_property(srna, "use_stroke_random_hue", PROP_BOOLEAN, PROP_NONE);
1812 RNA_def_property_deprecated(prop, "Deprecated, use brush.use_stroke_random_hue", 503, 600);
1813 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", GP_BRUSH_UNUSED_2);
1814 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
1815 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
1817 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1818
1819 prop = RNA_def_property(srna, "use_stroke_random_sat", PROP_BOOLEAN, PROP_NONE);
1820 RNA_def_property_deprecated(prop, "Deprecated, use brush.use_stroke_random_sat", 503, 600);
1821 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", GP_BRUSH_UNUSED_3);
1822 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
1823 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
1825 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1826
1827 prop = RNA_def_property(srna, "use_stroke_random_val", PROP_BOOLEAN, PROP_NONE);
1828 RNA_def_property_deprecated(prop, "Deprecated, use brush.use_stroke_random_val", 503, 600);
1829 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", GP_BRUSH_UNUSED_4);
1830 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
1831 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
1833 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1834
1835 prop = RNA_def_property(srna, "use_stroke_random_radius", PROP_BOOLEAN, PROP_NONE);
1837 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
1838 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
1840 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1841
1842 prop = RNA_def_property(srna, "use_stroke_random_strength", PROP_BOOLEAN, PROP_NONE);
1844 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
1845 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
1847 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1848
1849 prop = RNA_def_property(srna, "use_stroke_random_uv", PROP_BOOLEAN, PROP_NONE);
1851 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
1852 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
1854 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1855
1856 prop = RNA_def_property(srna, "use_random_press_hue", PROP_BOOLEAN, PROP_NONE);
1857 RNA_def_property_deprecated(prop, "Deprecated, use brush.use_random_press_hue", 503, 600);
1858 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", GP_BRUSH_UNUSED_5);
1859 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1860 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
1862 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1863
1864 prop = RNA_def_property(srna, "use_random_press_sat", PROP_BOOLEAN, PROP_NONE);
1865 RNA_def_property_deprecated(prop, "Deprecated, use brush.use_random_press_sat", 503, 600);
1866 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", GP_BRUSH_UNUSED_6);
1867 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1868 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
1870 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1871
1872 prop = RNA_def_property(srna, "use_random_press_val", PROP_BOOLEAN, PROP_NONE);
1873 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", GP_BRUSH_UNUSED_7);
1874 RNA_def_property_deprecated(prop, "Deprecated, use brush.use_random_press_val", 503, 600);
1875 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1876 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
1878 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1879
1880 prop = RNA_def_property(srna, "use_random_press_radius", PROP_BOOLEAN, PROP_NONE);
1882 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1883 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
1885 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1886
1887 prop = RNA_def_property(srna, "use_random_press_strength", PROP_BOOLEAN, PROP_NONE);
1889 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1890 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
1892 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1893
1894 prop = RNA_def_property(srna, "use_random_press_uv", PROP_BOOLEAN, PROP_NONE);
1896 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
1897 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
1899 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1900
1901 prop = RNA_def_property(srna, "stroke_type", PROP_ENUM, PROP_NONE);
1902 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag2");
1903 RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_stroke_type_items);
1904 RNA_def_property_ui_text(prop, "Stroke Mode", "Mode to use when creating strokes");
1907 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1908
1909 prop = RNA_def_property(srna, "use_settings_stabilizer", PROP_BOOLEAN, PROP_NONE);
1913 "Use Stabilizer",
1914 "Draw lines with a delay to allow smooth strokes (press Shift key to "
1915 "override while drawing)");
1917 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1918
1919 prop = RNA_def_property(srna, "use_cyclic_stroke", PROP_BOOLEAN, PROP_NONE);
1922 RNA_def_property_ui_icon(prop, ICON_GP_CYCLIC_STROKE, 0);
1923 RNA_def_property_ui_text(prop, "Cyclic", "Create a cyclic stroke");
1925 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1926
1927 prop = RNA_def_property(srna, "eraser_mode", PROP_ENUM, PROP_NONE);
1928 RNA_def_property_enum_sdna(prop, nullptr, "eraser_mode");
1930 RNA_def_property_ui_text(prop, "Mode", "Eraser Mode");
1933 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_update");
1934
1935 prop = RNA_def_property(srna, "caps_type", PROP_ENUM, PROP_NONE);
1936 RNA_def_property_enum_sdna(prop, nullptr, "caps_type");
1937 RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_caps_types_items);
1938 RNA_def_property_ui_text(prop, "Caps Type", "The shape of the start and end of the stroke");
1941 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1942
1943 prop = RNA_def_property(srna, "fill_draw_mode", PROP_ENUM, PROP_NONE);
1944 RNA_def_property_enum_sdna(prop, nullptr, "fill_draw_mode");
1946 RNA_def_property_ui_text(prop, "Mode", "Mode to draw boundary limits");
1948 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1949
1950 prop = RNA_def_property(srna, "fill_layer_mode", PROP_ENUM, PROP_NONE);
1951 RNA_def_property_enum_sdna(prop, nullptr, "fill_layer_mode");
1953 RNA_def_property_ui_text(prop, "Layer Mode", "Layers used as boundaries");
1955 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1956
1957 prop = RNA_def_property(srna, "fill_direction", PROP_ENUM, PROP_NONE);
1958 RNA_def_property_enum_sdna(prop, nullptr, "fill_direction");
1960 RNA_def_property_ui_text(prop, "Direction", "Direction of the fill");
1963 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1964
1965 prop = RNA_def_property(srna, "fill_solver", PROP_ENUM, PROP_NONE);
1966 RNA_def_property_enum_sdna(prop, nullptr, "fill_solver");
1968 RNA_def_property_ui_text(prop, "Fill Solver", "Method used for when filling");
1970 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1971
1972 prop = RNA_def_property(srna, "fill_gap_factor", PROP_FLOAT, PROP_FACTOR);
1973 RNA_def_property_range(prop, 0.0f, 1.0f);
1975 "Gap Detection Factor",
1976 "The sensitivity of the gap detection. Higher values results in more "
1977 "gaps detected and as such can create smaller fills");
1979 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1980
1981 prop = RNA_def_property(srna, "pin_draw_mode", PROP_BOOLEAN, PROP_NONE);
1983 prop, "rna_GPencilBrush_pin_mode_get", "rna_GPencilBrush_pin_mode_set");
1984 RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
1987 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencilBrush_pin_mode_update");
1988 RNA_def_property_ui_text(prop, "Pin Mode", "Pin the mode to the brush");
1989
1990 prop = RNA_def_property(srna, "brush_draw_mode", PROP_ENUM, PROP_NONE);
1991 RNA_def_property_enum_sdna(prop, nullptr, "brush_draw_mode");
1993 RNA_def_property_ui_text(prop, "Mode", "Preselected mode when using this brush");
1995 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
1996
1997 prop = RNA_def_property(srna, "use_trim", PROP_BOOLEAN, PROP_NONE);
2000 RNA_def_property_ui_text(prop, "Trim Stroke Ends", "Trim intersecting stroke ends");
2002 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2003
2004 prop = RNA_def_property(srna, "use_settings_outline", PROP_BOOLEAN, PROP_NONE);
2007 RNA_def_property_ui_text(prop, "Outline", "Convert stroke to outline");
2009 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2010
2011 prop = RNA_def_property(srna, "use_edit_position", PROP_BOOLEAN, PROP_NONE);
2013 prop, nullptr, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_APPLY_POSITION);
2014 RNA_def_property_ui_text(prop, "Affect Position", "The brush affects the position of the point");
2016 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_BrushGpencilSettings_update");
2017
2018 prop = RNA_def_property(srna, "use_edit_strength", PROP_BOOLEAN, PROP_NONE);
2020 prop, nullptr, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_APPLY_STRENGTH);
2022 prop, "Affect Strength", "The brush affects the color strength of the point");
2024 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_BrushGpencilSettings_update");
2025
2026 prop = RNA_def_property(srna, "use_edit_thickness", PROP_BOOLEAN, PROP_NONE);
2028 prop, nullptr, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_APPLY_THICKNESS);
2030 prop, "Affect Thickness", "The brush affects the thickness of the point");
2032 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_BrushGpencilSettings_update");
2033
2034 prop = RNA_def_property(srna, "use_edit_uv", PROP_BOOLEAN, PROP_NONE);
2035 RNA_def_property_boolean_sdna(prop, nullptr, "sculpt_mode_flag", GP_SCULPT_FLAGMODE_APPLY_UV);
2036 RNA_def_property_ui_text(prop, "Affect UV", "The brush affects the UV rotation of the point");
2038 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_BrushGpencilSettings_update");
2039
2040 /* Material */
2041 prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
2042 RNA_def_property_struct_type(prop, "Material");
2044 prop, nullptr, nullptr, nullptr, "rna_BrushGpencilSettings_material_poll");
2046 RNA_def_property_ui_text(prop, "Material", "Material used for strokes drawn using this brush");
2048 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_Brush_material_update");
2049
2050 /* Secondary Material */
2051 prop = RNA_def_property(srna, "material_alt", PROP_POINTER, PROP_NONE);
2052 RNA_def_property_struct_type(prop, "Material");
2054 prop, nullptr, nullptr, nullptr, "rna_BrushGpencilSettings_material_poll");
2056 RNA_def_property_ui_text(prop, "Material", "Material used for secondary uses for this brush");
2058 RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_Brush_material_update");
2059
2060 prop = RNA_def_property(srna, "show_fill_boundary", PROP_BOOLEAN, PROP_NONE);
2063 RNA_def_property_ui_text(prop, "Show Lines", "Show help lines for filling to see boundaries");
2065 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2066
2067 prop = RNA_def_property(srna, "show_fill_extend", PROP_BOOLEAN, PROP_NONE);
2070 RNA_def_property_ui_text(prop, "Visual Aids", "Show help lines for stroke extension");
2072 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2073
2074 prop = RNA_def_property(srna, "use_collide_strokes", PROP_BOOLEAN, PROP_NONE);
2078 prop, "Strokes Collision", "Check if extend lines collide with strokes");
2080 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2081
2082 prop = RNA_def_property(srna, "show_fill", PROP_BOOLEAN, PROP_NONE);
2085 prop, "Show Fill", "Show transparent lines to use as boundary for filling");
2087 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2088
2089 prop = RNA_def_property(srna, "use_auto_remove_fill_guides", PROP_BOOLEAN, PROP_NONE);
2093 "Auto-Remove Fill Guides",
2094 "Automatically remove fill guide strokes after fill operation");
2096 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2097
2098 prop = RNA_def_property(srna, "fill_internal_gaps", PROP_BOOLEAN, PROP_NONE);
2101 RNA_def_property_ui_text(prop, "Internal Gaps", "Stop at internal gaps");
2103 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2104
2105 prop = RNA_def_property(srna, "curve_type", PROP_ENUM, PROP_NONE);
2107 RNA_def_property_ui_text(prop, "Curve Type", "Type of curves");
2110 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2111
2112 prop = RNA_def_property(srna, "use_fill_limit", PROP_BOOLEAN, PROP_NONE);
2115 RNA_def_property_ui_text(prop, "Limit to Viewport", "Fill only visible areas in viewport");
2117 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2118
2119 prop = RNA_def_property(srna, "use_settings_postprocess", PROP_BOOLEAN, PROP_NONE);
2122 prop, "Use Post-Process Settings", "Additional post processing options for new strokes");
2124 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2125
2126 prop = RNA_def_property(srna, "use_settings_random", PROP_BOOLEAN, PROP_NONE);
2128 RNA_def_property_ui_text(prop, "Random Settings", "Random brush settings");
2130 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2131
2132 prop = RNA_def_property(srna, "use_material_pin", PROP_BOOLEAN, PROP_NONE);
2135 RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
2136 RNA_def_property_ui_text(prop, "Pin Material", "Keep material assigned to brush");
2139 prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_use_material_pin_update");
2140
2141 prop = RNA_def_property(srna, "show_lasso", PROP_BOOLEAN, PROP_NONE);
2143 RNA_def_property_ui_text(prop, "Show Lasso", "Display fill color while drawing the stroke");
2145 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2146
2147 prop = RNA_def_property(srna, "use_occlude_eraser", PROP_BOOLEAN, PROP_NONE);
2149 RNA_def_property_ui_text(prop, "Occlude Eraser", "Erase only strokes visible and not occluded");
2151 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2152
2153 prop = RNA_def_property(srna, "use_keep_caps_eraser", PROP_BOOLEAN, PROP_NONE);
2156 prop, "Keep Caps", "Keep the caps as they are and don't flatten them when erasing");
2158 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2159
2160 prop = RNA_def_property(srna, "use_active_layer_only", PROP_BOOLEAN, PROP_NONE);
2162 RNA_def_property_ui_text(prop, "Active Layer", "Only edit the active layer of the object");
2164 RNA_def_property_update(prop, 0, "rna_BrushGpencilSettings_update");
2165}
2166
2168{
2169 StructRNA *srna;
2170 PropertyRNA *prop;
2171
2172 static const EnumPropertyItem density_mode_items[] = {
2174 "AUTO",
2175 ICON_AUTO,
2176 "Auto",
2177 "Either add or remove curves depending on the minimum distance of the curves under the "
2178 "cursor"},
2180 "ADD",
2181 ICON_ADD,
2182 "Add",
2183 "Add new curves between existing curves, taking the minimum distance into account"},
2185 "REMOVE",
2186 ICON_REMOVE,
2187 "Remove",
2188 "Remove curves whose root points are too close"},
2189 {0, nullptr, 0, nullptr, nullptr},
2190 };
2191
2192 srna = RNA_def_struct(brna, "BrushCurvesSculptSettings", nullptr);
2193 RNA_def_struct_path_func(srna, "rna_BrushCurvesSculptSettings_path");
2194 RNA_def_struct_sdna(srna, "BrushCurvesSculptSettings");
2195 RNA_def_struct_ui_text(srna, "Curves Sculpt Brush Settings", "");
2196
2197 prop = RNA_def_property(srna, "add_amount", PROP_INT, PROP_NONE);
2199 RNA_def_property_ui_text(prop, "Count", "Number of curves added by the Add brush");
2200 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2201
2202 prop = RNA_def_property(srna, "points_per_curve", PROP_INT, PROP_NONE);
2205 prop, "Points per Curve", "Number of control points in a newly added curve");
2206 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2207
2208 prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
2211 "Scale Uniform",
2212 "Grow or shrink curves by changing their size uniformly instead of "
2213 "using trimming or extrapolation");
2214 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2215
2216 prop = RNA_def_property(srna, "minimum_length", PROP_FLOAT, PROP_DISTANCE);
2217 RNA_def_property_range(prop, 0.0f, FLT_MAX);
2219 prop, "Minimum Length", "Avoid shrinking curves shorter than this length");
2220
2221 prop = RNA_def_property(srna, "use_length_interpolate", PROP_BOOLEAN, PROP_NONE);
2223 prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH);
2225 prop, "Interpolate Length", "Use length of the curves in close proximity");
2226 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2227
2228 prop = RNA_def_property(srna, "use_radius_interpolate", PROP_BOOLEAN, PROP_NONE);
2230 prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_RADIUS);
2233 prop, "Interpolate Radius", "Use radius of the curves in close proximity");
2234 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2235
2236 prop = RNA_def_property(srna, "use_point_count_interpolate", PROP_BOOLEAN, PROP_NONE);
2240 "Interpolate Point Count",
2241 "Use the number of points from the curves in close proximity");
2242 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2243
2244 prop = RNA_def_property(srna, "use_shape_interpolate", PROP_BOOLEAN, PROP_NONE);
2247 prop, "Interpolate Shape", "Use shape of the curves in close proximity");
2248 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2249
2250 prop = RNA_def_property(srna, "curve_length", PROP_FLOAT, PROP_DISTANCE);
2251 RNA_def_property_range(prop, 0.0, FLT_MAX);
2253 prop,
2254 "Curve Length",
2255 "Length of newly added curves when it is not interpolated from other curves");
2256 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2257
2258 prop = RNA_def_property(srna, "minimum_distance", PROP_FLOAT, PROP_DISTANCE);
2259 RNA_def_property_range(prop, 0.0f, FLT_MAX);
2260 RNA_def_property_ui_range(prop, 0.0, 1000.0f, 0.001, 2);
2262 prop, "Minimum Distance", "Goal distance between curve roots for the Density brush");
2263 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2264
2265 prop = RNA_def_property(srna, "curve_radius", PROP_FLOAT, PROP_DISTANCE);
2266 RNA_def_property_range(prop, 0.0, FLT_MAX);
2267 RNA_def_property_float_default(prop, 0.01f);
2268 RNA_def_property_ui_range(prop, 0.0, 1000.0f, 0.001, 2);
2270 prop,
2271 "Curve Radius",
2272 "Radius of newly added curves when it is not interpolated from other curves");
2273 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2274
2275 prop = RNA_def_property(srna, "density_add_attempts", PROP_INT, PROP_NONE);
2278 prop, "Density Add Attempts", "How many times the Density brush tries to add a new curve");
2279 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2280
2281 prop = RNA_def_property(srna, "density_mode", PROP_ENUM, PROP_NONE);
2282 RNA_def_property_enum_items(prop, density_mode_items);
2284 prop, "Density Mode", "Determines whether the brush adds or removes curves");
2286 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2287
2288 prop = RNA_def_property(srna, "curve_parameter_falloff", PROP_POINTER, PROP_NONE);
2289 RNA_def_property_struct_type(prop, "CurveMapping");
2291 "Curve Parameter Falloff",
2292 "Falloff that is applied from the tip to the root of each curve");
2293 RNA_def_property_update(prop, 0, "rna_BrushCurvesSculptSettings_update");
2294}
2295
2296static void rna_def_brush(BlenderRNA *brna)
2297{
2298 StructRNA *srna;
2299 PropertyRNA *prop;
2300
2301 static const EnumPropertyItem prop_blend_items[] = {
2302 {IMB_BLEND_MIX, "MIX", 0, "Mix", "Use Mix blending mode while painting"},
2304 {IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use Darken blending mode while painting"},
2305 {IMB_BLEND_MUL, "MUL", 0, "Multiply", "Use Multiply blending mode while painting"},
2307 "COLORBURN",
2308 0,
2309 "Color Burn",
2310 "Use Color Burn blending mode while painting"},
2312 "LINEARBURN",
2313 0,
2314 "Linear Burn",
2315 "Use Linear Burn blending mode while painting"},
2317 {IMB_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use Lighten blending mode while painting"},
2318 {IMB_BLEND_SCREEN, "SCREEN", 0, "Screen", "Use Screen blending mode while painting"},
2320 "COLORDODGE",
2321 0,
2322 "Color Dodge",
2323 "Use Color Dodge blending mode while painting"},
2324 {IMB_BLEND_ADD, "ADD", 0, "Add", "Use Add blending mode while painting"},
2326 {IMB_BLEND_OVERLAY, "OVERLAY", 0, "Overlay", "Use Overlay blending mode while painting"},
2328 "SOFTLIGHT",
2329 0,
2330 "Soft Light",
2331 "Use Soft Light blending mode while painting"},
2333 "HARDLIGHT",
2334 0,
2335 "Hard Light",
2336 "Use Hard Light blending mode while painting"},
2338 "VIVIDLIGHT",
2339 0,
2340 "Vivid Light",
2341 "Use Vivid Light blending mode while painting"},
2343 "LINEARLIGHT",
2344 0,
2345 "Linear Light",
2346 "Use Linear Light blending mode while painting"},
2348 "PINLIGHT",
2349 0,
2350 "Pin Light",
2351 "Use Pin Light blending mode while painting"},
2354 "DIFFERENCE",
2355 0,
2356 "Difference",
2357 "Use Difference blending mode while painting"},
2359 "EXCLUSION",
2360 0,
2361 "Exclusion",
2362 "Use Exclusion blending mode while painting"},
2363 {IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use Subtract blending mode while painting"},
2365 {IMB_BLEND_HUE, "HUE", 0, "Hue", "Use Hue blending mode while painting"},
2367 "SATURATION",
2368 0,
2369 "Saturation",
2370 "Use Saturation blending mode while painting"},
2371 {IMB_BLEND_COLOR, "COLOR", 0, "Color", "Use Color blending mode while painting"},
2372 {IMB_BLEND_LUMINOSITY, "LUMINOSITY", 0, "Value", "Use Value blending mode while painting"},
2374 {IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting"},
2375 {IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting"},
2376 {0, nullptr, 0, nullptr, nullptr},
2377 };
2378
2379 static const EnumPropertyItem brush_sculpt_plane_items[] = {
2380 {SCULPT_DISP_DIR_AREA, "AREA", 0, "Area Plane", ""},
2381 {SCULPT_DISP_DIR_VIEW, "VIEW", 0, "View Plane", ""},
2382 {SCULPT_DISP_DIR_X, "X", 0, "X Plane", ""},
2383 {SCULPT_DISP_DIR_Y, "Y", 0, "Y Plane", ""},
2384 {SCULPT_DISP_DIR_Z, "Z", 0, "Z Plane", ""},
2385 {0, nullptr, 0, nullptr, nullptr},
2386 };
2387
2388 static const EnumPropertyItem brush_mask_tool_items[] = {
2389 {BRUSH_MASK_DRAW, "DRAW", 0, "Draw", ""},
2390 {BRUSH_MASK_SMOOTH, "SMOOTH", 0, "Smooth", ""},
2391 {0, nullptr, 0, nullptr, nullptr},
2392 };
2393
2394 static const EnumPropertyItem brush_blur_mode_items[] = {
2395 {KERNEL_BOX, "BOX", 0, "Box", ""},
2396 {KERNEL_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", ""},
2397 {0, nullptr, 0, nullptr, nullptr},
2398 };
2399
2400 static const EnumPropertyItem brush_gradient_items[] = {
2401 {BRUSH_GRADIENT_PRESSURE, "PRESSURE", 0, "Pressure", ""},
2402 {BRUSH_GRADIENT_SPACING_REPEAT, "SPACING_REPEAT", 0, "Repeat", ""},
2403 {BRUSH_GRADIENT_SPACING_CLAMP, "SPACING_CLAMP", 0, "Clamp", ""},
2404 {0, nullptr, 0, nullptr, nullptr},
2405 };
2406
2407 static const EnumPropertyItem brush_gradient_fill_items[] = {
2408 {BRUSH_GRADIENT_LINEAR, "LINEAR", 0, "Linear", ""},
2409 {BRUSH_GRADIENT_RADIAL, "RADIAL", 0, "Radial", ""},
2410 {0, nullptr, 0, nullptr, nullptr},
2411 };
2412
2413 static const EnumPropertyItem brush_mask_pressure_items[] = {
2414 {0, "NONE", 0, "Off", ""},
2415 {BRUSH_MASK_PRESSURE_RAMP, "RAMP", ICON_STYLUS_PRESSURE, "Ramp", ""},
2416 {BRUSH_MASK_PRESSURE_CUTOFF, "CUTOFF", ICON_STYLUS_PRESSURE, "Cutoff", ""},
2417 {0, nullptr, 0, nullptr, nullptr},
2418 };
2419
2420 static const EnumPropertyItem brush_size_unit_items[] = {
2421 {0, "VIEW", 0, "View", "Measure brush size relative to the view"},
2422 {BRUSH_LOCK_SIZE, "SCENE", 0, "Scene", "Measure brush size relative to the scene"},
2423 {0, nullptr, 0, nullptr, nullptr},
2424 };
2425
2426 static const EnumPropertyItem color_gradient_items[] = {
2427 {0, "COLOR", 0, "Color", "Paint with a single color"},
2428 {BRUSH_USE_GRADIENT, "GRADIENT", 0, "Gradient", "Paint with a gradient"},
2429 {0, nullptr, 0, nullptr, nullptr},
2430 };
2431
2432 static const EnumPropertyItem brush_spacing_unit_items[] = {
2433 {0, "VIEW", 0, "View", "Calculate brush spacing relative to the view"},
2435 "SCENE",
2436 0,
2437 "Scene",
2438 "Calculate brush spacing relative to the scene using the stroke location"},
2439 {0, nullptr, 0, nullptr, nullptr},
2440 };
2441
2442 static const EnumPropertyItem brush_jitter_unit_items[] = {
2443 {BRUSH_ABSOLUTE_JITTER, "VIEW", 0, "View", "Jittering happens in screen space, in pixels"},
2444 {0, "BRUSH", 0, "Brush", "Jittering happens relative to the brush size"},
2445 {0, nullptr, 0, nullptr, nullptr},
2446 };
2447
2448 static const EnumPropertyItem falloff_shape_unit_items[] = {
2449 {0, "SPHERE", 0, "Sphere", "Apply brush influence in a Sphere, outwards from the center"},
2451 "PROJECTED",
2452 0,
2453 "Projected",
2454 "Apply brush influence in a 2D circle, projected from the view"},
2455 {0, nullptr, 0, nullptr, nullptr},
2456 };
2457
2458 static const EnumPropertyItem brush_deformation_target_items[] = {
2460 "GEOMETRY",
2461 0,
2462 "Geometry",
2463 "Brush deformation displaces the vertices of the mesh"},
2465 "CLOTH_SIM",
2466 0,
2467 "Cloth Simulation",
2468 "Brush deforms the mesh by deforming the constraints of a cloth simulation"},
2469 {0, nullptr, 0, nullptr, nullptr},
2470 };
2471
2472 static const EnumPropertyItem brush_elastic_deform_type_items[] = {
2473 {BRUSH_ELASTIC_DEFORM_GRAB, "GRAB", 0, "Grab", ""},
2474 {BRUSH_ELASTIC_DEFORM_GRAB_BISCALE, "GRAB_BISCALE", 0, "Bi-Scale Grab", ""},
2475 {BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE, "GRAB_TRISCALE", 0, "Tri-Scale Grab", ""},
2476 {BRUSH_ELASTIC_DEFORM_SCALE, "SCALE", 0, "Scale", ""},
2477 {BRUSH_ELASTIC_DEFORM_TWIST, "TWIST", 0, "Twist", ""},
2478 {0, nullptr, 0, nullptr, nullptr},
2479 };
2480
2481 static const EnumPropertyItem brush_snake_hook_deform_type_items[] = {
2483 "FALLOFF",
2484 0,
2485 "Radius Falloff",
2486 "Applies the brush falloff in the tip of the brush"},
2488 "ELASTIC",
2489 0,
2490 "Elastic",
2491 "Modifies the entire mesh using elastic deform"},
2492 {0, nullptr, 0, nullptr, nullptr},
2493 };
2494
2495 static const EnumPropertyItem brush_plane_inversion_mode_items[] = {
2497 "INVERT_DISPLACEMENT",
2498 0,
2499 "Invert Displacement",
2500 "Displace the vertices away from the plane."},
2502 "SWAP_DEPTH_AND_HEIGHT",
2503 0,
2504 "Swap Height and Depth",
2505 "Swap the roles of Height and Depth."},
2506 {0, nullptr, 0, nullptr, nullptr},
2507 };
2508
2509 static const EnumPropertyItem brush_project_ray_direction_type_items[] = {
2511 "VIEW_NORMAL",
2512 0,
2513 "View Normal",
2514 "Project the vertices along the view normal."},
2516 "PLANE_NORMAL",
2517 0,
2518 "Plane Normal",
2519 "Project the vertices along the plane normal."},
2520 {0, nullptr, 0, nullptr, nullptr},
2521 };
2522
2523 static const EnumPropertyItem brush_cloth_deform_type_items[] = {
2524 {BRUSH_CLOTH_DEFORM_DRAG, "DRAG", 0, "Drag", ""},
2525 {BRUSH_CLOTH_DEFORM_PUSH, "PUSH", 0, "Push", ""},
2526 {BRUSH_CLOTH_DEFORM_PINCH_POINT, "PINCH_POINT", 0, "Pinch Point", ""},
2528 "PINCH_PERPENDICULAR",
2529 0,
2530 "Pinch Perpendicular",
2531 ""},
2532 {BRUSH_CLOTH_DEFORM_INFLATE, "INFLATE", 0, "Inflate", ""},
2533 {BRUSH_CLOTH_DEFORM_GRAB, "GRAB", 0, "Grab", ""},
2534 {BRUSH_CLOTH_DEFORM_EXPAND, "EXPAND", 0, "Expand", ""},
2535 {BRUSH_CLOTH_DEFORM_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""},
2536 {0, nullptr, 0, nullptr, nullptr},
2537 };
2538
2539 static const EnumPropertyItem brush_cloth_force_falloff_type_items[] = {
2540 {BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, "RADIAL", 0, "Radial", ""},
2541 {BRUSH_CLOTH_FORCE_FALLOFF_PLANE, "PLANE", 0, "Plane", ""},
2542 {0, nullptr, 0, nullptr, nullptr},
2543 };
2544
2545 static const EnumPropertyItem brush_boundary_falloff_type_items[] = {
2547 "CONSTANT",
2548 0,
2549 "Constant",
2550 "Applies the same deformation in the entire boundary"},
2552 "RADIUS",
2553 0,
2554 "Brush Radius",
2555 "Applies the deformation in a localized area limited by the brush radius"},
2557 "LOOP",
2558 0,
2559 "Loop",
2560 "Applies the brush falloff in a loop pattern"},
2562 "LOOP_INVERT",
2563 0,
2564 "Loop and Invert",
2565 "Applies the falloff radius in a loop pattern, inverting the displacement direction in "
2566 "each pattern repetition"},
2567 {0, nullptr, 0, nullptr, nullptr},
2568 };
2569
2570 static const EnumPropertyItem brush_cloth_simulation_area_type_items[] = {
2572 "LOCAL",
2573 0,
2574 "Local",
2575 "Simulates only a specific area around the brush limited by a fixed radius"},
2576 {BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, "GLOBAL", 0, "Global", "Simulates the entire mesh"},
2578 "DYNAMIC",
2579 0,
2580 "Dynamic",
2581 "The active simulation area moves with the brush"},
2582 {0, nullptr, 0, nullptr, nullptr},
2583 };
2584
2585 static const EnumPropertyItem brush_smooth_deform_type_items[] = {
2587 "LAPLACIAN",
2588 0,
2589 "Laplacian",
2590 "Smooths the surface and the volume"},
2592 "SURFACE",
2593 0,
2594 "Surface",
2595 "Smooths the surface of the mesh, preserving the volume"},
2596 {0, nullptr, 0, nullptr, nullptr},
2597 };
2598
2599 static const EnumPropertyItem brush_pose_deform_type_items[] = {
2600 {BRUSH_POSE_DEFORM_ROTATE_TWIST, "ROTATE_TWIST", 0, "Rotate/Twist", ""},
2601 {BRUSH_POSE_DEFORM_SCALE_TRANSLATE, "SCALE_TRANSLATE", 0, "Scale/Translate", ""},
2602 {BRUSH_POSE_DEFORM_SQUASH_STRETCH, "SQUASH_STRETCH", 0, "Squash & Stretch", ""},
2603 {0, nullptr, 0, nullptr, nullptr},
2604 };
2605
2606 static const EnumPropertyItem brush_pose_origin_type_items[] = {
2608 "TOPOLOGY",
2609 0,
2610 "Topology",
2611 "Sets the rotation origin automatically using the topology and shape of the mesh as a "
2612 "guide"},
2614 "FACE_SETS",
2615 0,
2616 "Face Sets",
2617 "Creates a pose segment per face set, starting from the active face set"},
2619 "FACE_SETS_FK",
2620 0,
2621 "Face Sets FK",
2622 "Simulates an FK deformation using the face set under the cursor as control"},
2623 {0, nullptr, 0, nullptr, nullptr},
2624 };
2625
2626 static const EnumPropertyItem brush_smear_deform_type_items[] = {
2627 {BRUSH_SMEAR_DEFORM_DRAG, "DRAG", 0, "Drag", ""},
2628 {BRUSH_SMEAR_DEFORM_PINCH, "PINCH", 0, "Pinch", ""},
2629 {BRUSH_SMEAR_DEFORM_EXPAND, "EXPAND", 0, "Expand", ""},
2630 {0, nullptr, 0, nullptr, nullptr},
2631 };
2632
2633 static const EnumPropertyItem brush_slide_deform_type_items[] = {
2634 {BRUSH_SLIDE_DEFORM_DRAG, "DRAG", 0, "Drag", ""},
2635 {BRUSH_SLIDE_DEFORM_PINCH, "PINCH", 0, "Pinch", ""},
2636 {BRUSH_SLIDE_DEFORM_EXPAND, "EXPAND", 0, "Expand", ""},
2637 {0, nullptr, 0, nullptr, nullptr},
2638 };
2639
2640 static const EnumPropertyItem brush_boundary_deform_type_items[] = {
2641 {BRUSH_BOUNDARY_DEFORM_BEND, "BEND", 0, "Bend", ""},
2642 {BRUSH_BOUNDARY_DEFORM_EXPAND, "EXPAND", 0, "Expand", ""},
2643 {BRUSH_BOUNDARY_DEFORM_INFLATE, "INFLATE", 0, "Inflate", ""},
2644 {BRUSH_BOUNDARY_DEFORM_GRAB, "GRAB", 0, "Grab", ""},
2645 {BRUSH_BOUNDARY_DEFORM_TWIST, "TWIST", 0, "Twist", ""},
2646 {BRUSH_BOUNDARY_DEFORM_SMOOTH, "SMOOTH", 0, "Smooth", ""},
2647 {0, nullptr, 0, nullptr, nullptr},
2648 };
2649
2650 srna = RNA_def_struct(brna, "Brush", "ID");
2652 srna, "Brush", "Brush data-block for storing brush settings for painting and sculpting");
2653 RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA);
2654
2655 prop = RNA_def_property(srna, "has_unsaved_changes", PROP_BOOLEAN, PROP_NONE);
2658 "Has unsaved changes",
2659 "Indicates that there are any user visible changes since the brush has "
2660 "been imported or read from the file");
2661
2662 /* enums */
2663 prop = RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
2664 RNA_def_property_enum_items(prop, prop_blend_items);
2665 RNA_def_property_ui_text(prop, "Blending Mode", "Brush blending mode");
2667 RNA_def_property_update(prop, 0, "rna_Brush_update");
2668
2674 prop = RNA_def_property(srna, "sculpt_brush_type", PROP_ENUM, PROP_NONE);
2675 RNA_def_property_enum_sdna(prop, nullptr, "sculpt_brush_type");
2677 RNA_def_property_ui_text(prop, "Brush Type", "");
2679 RNA_def_property_update(prop, 0, "rna_Brush_update");
2680
2681 prop = RNA_def_property(srna, "vertex_brush_type", PROP_ENUM, PROP_NONE);
2682 RNA_def_property_enum_sdna(prop, nullptr, "vertex_brush_type");
2684 RNA_def_property_ui_text(prop, "Brush Type", "");
2685 RNA_def_property_update(prop, 0, "rna_Brush_update");
2686
2687 prop = RNA_def_property(srna, "weight_brush_type", PROP_ENUM, PROP_NONE);
2688 RNA_def_property_enum_sdna(prop, nullptr, "weight_brush_type");
2690 RNA_def_property_ui_text(prop, "Brush Type", "");
2691 RNA_def_property_update(prop, 0, "rna_Brush_update");
2692
2693 prop = RNA_def_property(srna, "image_brush_type", PROP_ENUM, PROP_NONE);
2694 RNA_def_property_enum_sdna(prop, nullptr, "image_brush_type");
2696 RNA_def_property_ui_text(prop, "Brush Type", "");
2698 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_Brush_update");
2699
2700 prop = RNA_def_property(srna, "gpencil_brush_type", PROP_ENUM, PROP_NONE);
2701 RNA_def_property_enum_sdna(prop, nullptr, "gpencil_brush_type");
2703 RNA_def_property_ui_text(prop, "Brush Type", "");
2706 RNA_def_property_update(prop, 0, "rna_Brush_update");
2707
2708 prop = RNA_def_property(srna, "gpencil_vertex_brush_type", PROP_ENUM, PROP_NONE);
2709 RNA_def_property_enum_sdna(prop, nullptr, "gpencil_vertex_brush_type");
2711 RNA_def_property_ui_text(prop, "Brush Type", "");
2713 RNA_def_property_update(prop, 0, "rna_Brush_update");
2714
2715 prop = RNA_def_property(srna, "gpencil_sculpt_brush_type", PROP_ENUM, PROP_NONE);
2716 RNA_def_property_enum_sdna(prop, nullptr, "gpencil_sculpt_brush_type");
2718 RNA_def_property_ui_text(prop, "Brush Type", "");
2721 RNA_def_property_update(prop, 0, "rna_Brush_update");
2722
2723 prop = RNA_def_property(srna, "gpencil_weight_brush_type", PROP_ENUM, PROP_NONE);
2724 RNA_def_property_enum_sdna(prop, nullptr, "gpencil_weight_brush_type");
2726 RNA_def_property_ui_text(prop, "Brush Type", "");
2728 RNA_def_property_update(prop, 0, "rna_Brush_update");
2729
2730 prop = RNA_def_property(srna, "curves_sculpt_brush_type", PROP_ENUM, PROP_NONE);
2731 RNA_def_property_enum_sdna(prop, nullptr, "curves_sculpt_brush_type");
2733 RNA_def_property_ui_text(prop, "Brush Type", "");
2736 RNA_def_property_update(prop, 0, "rna_Brush_update");
2737
2739
2740 prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
2741 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
2743 RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_Brush_direction_itemf");
2744 RNA_def_property_ui_text(prop, "Direction", "");
2746 RNA_def_property_update(prop, 0, "rna_Brush_update");
2747
2748 prop = RNA_def_property(srna, "stroke_method", PROP_ENUM, PROP_NONE);
2750 RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_Brush_stroke_itemf");
2751 RNA_def_property_ui_text(prop, "Stroke Method", "");
2753 RNA_def_property_update(prop, 0, "rna_Brush_stroke_update");
2754
2755 prop = RNA_def_property(srna, "sculpt_plane", PROP_ENUM, PROP_NONE);
2756 RNA_def_property_enum_items(prop, brush_sculpt_plane_items);
2757 RNA_def_property_ui_text(prop, "Sculpt Plane", "");
2758 RNA_def_property_update(prop, 0, "rna_Brush_update");
2759
2760 prop = RNA_def_property(srna, "mask_tool", PROP_ENUM, PROP_NONE);
2761 RNA_def_property_enum_items(prop, brush_mask_tool_items);
2762 RNA_def_property_ui_text(prop, "Mask Tool", "");
2764 RNA_def_property_update(prop, 0, "rna_Brush_update");
2765
2766 prop = RNA_def_property(srna, "curve_distance_falloff_preset", PROP_ENUM, PROP_NONE);
2768 RNA_def_property_ui_text(prop, "Falloff Curve Preset", "");
2770 BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */
2771 RNA_def_property_update(prop, 0, "rna_Brush_update");
2772
2773 prop = RNA_def_property(srna, "deform_target", PROP_ENUM, PROP_NONE);
2774 RNA_def_property_enum_items(prop, brush_deformation_target_items);
2776 prop, "Deformation Target", "How the deformation of the brush will affect the object");
2777 RNA_def_property_update(prop, 0, "rna_Brush_update");
2778
2779 prop = RNA_def_property(srna, "elastic_deform_type", PROP_ENUM, PROP_NONE);
2780 RNA_def_property_enum_items(prop, brush_elastic_deform_type_items);
2781 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2783 RNA_def_property_update(prop, 0, "rna_Brush_update");
2784
2785 prop = RNA_def_property(srna, "snake_hook_deform_type", PROP_ENUM, PROP_NONE);
2786 RNA_def_property_enum_items(prop, brush_snake_hook_deform_type_items);
2787 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2788 RNA_def_property_update(prop, 0, "rna_Brush_update");
2789
2790 prop = RNA_def_property(srna, "plane_inversion_mode", PROP_ENUM, PROP_NONE);
2791 RNA_def_property_enum_items(prop, brush_plane_inversion_mode_items);
2792 RNA_def_property_ui_text(prop, "Inversion Mode", "Inversion Mode");
2793 RNA_def_property_update(prop, 0, "rna_Brush_update");
2794
2795 prop = RNA_def_property(srna, "project_ray_direction_type", PROP_ENUM, PROP_NONE);
2796 RNA_def_property_enum_items(prop, brush_project_ray_direction_type_items);
2797 RNA_def_property_ui_text(prop, "Ray Direction", "Ray Direction");
2798 RNA_def_property_update(prop, 0, "rna_Brush_update");
2799
2800 prop = RNA_def_property(srna, "minimum_distance", PROP_FLOAT, PROP_DISTANCE);
2801 RNA_def_property_float_sdna(prop, nullptr, "minimum_distance");
2803 RNA_def_property_range(prop, 0.0f, 10.0f);
2804 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
2806 "Minimum Distance",
2807 "Minimum distance to other scene objects after projecting onto them");
2808 RNA_def_property_update(prop, 0, "rna_Brush_update");
2809
2810 prop = RNA_def_property(srna, "cloth_deform_type", PROP_ENUM, PROP_NONE);
2811 RNA_def_property_enum_items(prop, brush_cloth_deform_type_items);
2812 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2814 RNA_def_property_update(prop, 0, "rna_Brush_update");
2815
2816 prop = RNA_def_property(srna, "cloth_force_falloff_type", PROP_ENUM, PROP_NONE);
2817 RNA_def_property_enum_items(prop, brush_cloth_force_falloff_type_items);
2819 prop, "Force Falloff", "Shape used in the brush to apply force to the cloth");
2820 RNA_def_property_update(prop, 0, "rna_Brush_update");
2821
2822 prop = RNA_def_property(srna, "cloth_simulation_area_type", PROP_ENUM, PROP_NONE);
2823 RNA_def_property_enum_items(prop, brush_cloth_simulation_area_type_items);
2825 prop,
2826 "Simulation Area",
2827 "Part of the mesh that is going to be simulated when the stroke is active");
2828 RNA_def_property_update(prop, 0, "rna_Brush_update");
2829
2830 prop = RNA_def_property(srna, "boundary_falloff_type", PROP_ENUM, PROP_NONE);
2831 RNA_def_property_enum_items(prop, brush_boundary_falloff_type_items);
2833 prop, "Boundary Falloff", "How the brush falloff is applied across the boundary");
2834 RNA_def_property_update(prop, 0, "rna_Brush_update");
2835
2836 prop = RNA_def_property(srna, "smooth_deform_type", PROP_ENUM, PROP_NONE);
2837 RNA_def_property_enum_items(prop, brush_smooth_deform_type_items);
2838 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2839 RNA_def_property_update(prop, 0, "rna_Brush_update");
2840
2841 prop = RNA_def_property(srna, "smear_deform_type", PROP_ENUM, PROP_NONE);
2842 RNA_def_property_enum_items(prop, brush_smear_deform_type_items);
2843 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2845 RNA_def_property_update(prop, 0, "rna_Brush_update");
2846
2847 prop = RNA_def_property(srna, "slide_deform_type", PROP_ENUM, PROP_NONE);
2848 RNA_def_property_enum_items(prop, brush_slide_deform_type_items);
2849 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2851 RNA_def_property_update(prop, 0, "rna_Brush_update");
2852
2853 prop = RNA_def_property(srna, "boundary_deform_type", PROP_ENUM, PROP_NONE);
2854 RNA_def_property_enum_items(prop, brush_boundary_deform_type_items);
2855 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2857 RNA_def_property_update(prop, 0, "rna_Brush_update");
2858
2859 prop = RNA_def_property(srna, "pose_deform_type", PROP_ENUM, PROP_NONE);
2860 RNA_def_property_enum_items(prop, brush_pose_deform_type_items);
2861 RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
2862 RNA_def_property_update(prop, 0, "rna_Brush_update");
2863
2864 prop = RNA_def_property(srna, "pose_origin_type", PROP_ENUM, PROP_NONE);
2865 RNA_def_property_enum_items(prop, brush_pose_origin_type_items);
2867 "Rotation Origins",
2868 "Method to set the rotation origins for the segments of the brush");
2869 RNA_def_property_update(prop, 0, "rna_Brush_update");
2870
2871 prop = RNA_def_property(srna, "jitter_unit", PROP_ENUM, PROP_NONE); /* as an enum */
2872 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
2873 RNA_def_property_enum_items(prop, brush_jitter_unit_items);
2875 prop, "Jitter Unit", "Jitter in screen space or relative to brush size");
2876 RNA_def_property_update(prop, 0, "rna_Brush_update");
2877
2878 prop = RNA_def_property(srna, "falloff_shape", PROP_ENUM, PROP_NONE); /* as an enum */
2879 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "falloff_shape");
2880 RNA_def_property_enum_items(prop, falloff_shape_unit_items);
2881 RNA_def_property_ui_text(prop, "Falloff Shape", "Use projected or spherical falloff");
2882 RNA_def_property_update(prop, 0, "rna_Brush_update");
2883
2884 /* number values */
2885 prop = RNA_def_property(srna, "size", PROP_INT, PROP_PIXEL_DIAMETER);
2886 RNA_def_property_int_funcs(prop, nullptr, "rna_Brush_set_size", nullptr);
2889 RNA_def_property_ui_text(prop, "Size", "Diameter of the brush in pixels");
2890 RNA_def_property_update(prop, 0, "rna_Brush_size_update");
2891
2892 prop = RNA_def_property(srna, "unprojected_size", PROP_FLOAT, PROP_DISTANCE_DIAMETER);
2893 RNA_def_property_float_funcs(prop, nullptr, "rna_Brush_set_unprojected_size", nullptr);
2894 RNA_def_property_range(prop, 0.001, FLT_MAX);
2895 RNA_def_property_ui_range(prop, 0.001, 1, 1, -1);
2896 RNA_def_property_ui_text(prop, "Unprojected Size", "Diameter of brush in Blender units");
2897 RNA_def_property_update(prop, 0, "rna_Brush_size_update");
2898
2899 prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED);
2900 RNA_def_property_int_sdna(prop, nullptr, "input_samples");
2904 prop,
2905 "Input Samples",
2906 "Number of input samples to average together to smooth the brush stroke");
2907 RNA_def_property_update(prop, 0, "rna_Brush_update");
2908
2909 prop = RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
2910 RNA_def_property_float_sdna(prop, nullptr, "jitter");
2911 RNA_def_property_range(prop, 0.0f, 1000.0f);
2912 RNA_def_property_ui_range(prop, 0.0f, 2.0f, 0.1, 4);
2913 RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting");
2915 RNA_def_property_update(prop, 0, "rna_Brush_update");
2916
2917 prop = RNA_def_property(srna, "jitter_absolute", PROP_INT, PROP_PIXEL);
2918 RNA_def_property_int_sdna(prop, nullptr, "jitter_absolute");
2919 RNA_def_property_range(prop, 0, 1000000);
2921 prop, "Jitter", "Jitter the position of the brush in pixels while painting");
2923 RNA_def_property_update(prop, 0, "rna_Brush_update");
2924
2925 prop = RNA_def_property(srna, "spacing", PROP_INT, PROP_PERCENTAGE);
2926 RNA_def_property_int_sdna(prop, nullptr, "spacing");
2927 RNA_def_property_range(prop, 1, 1000);
2928 RNA_def_property_ui_range(prop, 1, 500, 5, -1);
2930 prop, "Spacing", "Spacing between brush daubs as a percentage of brush diameter");
2931 RNA_def_property_update(prop, 0, "rna_Brush_update");
2932
2933 prop = RNA_def_property(srna, "grad_spacing", PROP_INT, PROP_PIXEL);
2934 RNA_def_property_int_sdna(prop, nullptr, "gradient_spacing");
2935 RNA_def_property_range(prop, 1, 10000);
2936 RNA_def_property_ui_range(prop, 1, 10000, 5, -1);
2938 prop, "Gradient Spacing", "Spacing before brush gradient goes full circle");
2939 RNA_def_property_update(prop, 0, "rna_Brush_update");
2940
2941 prop = RNA_def_property(srna, "use_color_jitter", PROP_BOOLEAN, PROP_NONE);
2942 RNA_def_property_boolean_sdna(prop, nullptr, "flag2", BRUSH_JITTER_COLOR);
2943 RNA_def_property_ui_text(prop, "Use Color Jitter", "Jitter brush color");
2945 RNA_def_property_update(prop, 0, "rna_Brush_update");
2946
2947 prop = RNA_def_property(srna, "hue_jitter", PROP_FLOAT, PROP_NONE);
2948 RNA_def_property_float_sdna(prop, nullptr, "hsv_jitter[0]");
2949 RNA_def_property_range(prop, 0, 1.0f);
2950 RNA_def_property_ui_range(prop, 0, 1, 0.05, 2);
2951 RNA_def_property_ui_text(prop, "Hue Jitter", "Color jitter effect on hue");
2952 RNA_def_property_update(prop, 0, "rna_Brush_update");
2953
2954 prop = RNA_def_property(srna, "saturation_jitter", PROP_FLOAT, PROP_NONE);
2955 RNA_def_property_float_sdna(prop, nullptr, "hsv_jitter[1]");
2956 RNA_def_property_range(prop, 0, 1.0f);
2957 RNA_def_property_ui_range(prop, 0, 1, 0.05, 2);
2958 RNA_def_property_ui_text(prop, "Saturation Jitter", "Color jitter effect on saturation");
2959 RNA_def_property_update(prop, 0, "rna_Brush_update");
2960
2961 prop = RNA_def_property(srna, "value_jitter", PROP_FLOAT, PROP_NONE);
2962 RNA_def_property_float_sdna(prop, nullptr, "hsv_jitter[2]");
2963 RNA_def_property_range(prop, 0, 1.0f);
2964 RNA_def_property_ui_range(prop, 0, 1, 0.05, 2);
2965 RNA_def_property_ui_text(prop, "Value Jitter", "Color jitter effect on value");
2966 RNA_def_property_update(prop, 0, "rna_Brush_update");
2967
2968 prop = RNA_def_property(srna, "use_stroke_random_hue", PROP_BOOLEAN, PROP_NONE);
2970 prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_HUE_AT_STROKE);
2971 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
2972 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
2974
2975 prop = RNA_def_property(srna, "use_stroke_random_sat", PROP_BOOLEAN, PROP_NONE);
2977 prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_SAT_AT_STROKE);
2978 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
2979 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
2981
2982 prop = RNA_def_property(srna, "use_stroke_random_val", PROP_BOOLEAN, PROP_NONE);
2984 prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_VAL_AT_STROKE);
2985 RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
2986 RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level");
2988
2989 prop = RNA_def_property(srna, "use_random_press_hue", PROP_BOOLEAN, PROP_NONE);
2991 prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_HUE_RAND_PRESS);
2992 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
2993 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
2995
2996 prop = RNA_def_property(srna, "use_random_press_sat", PROP_BOOLEAN, PROP_NONE);
2998 prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_SAT_RAND_PRESS);
2999 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3000 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
3002
3003 prop = RNA_def_property(srna, "use_random_press_val", PROP_BOOLEAN, PROP_NONE);
3005 prop, nullptr, "color_jitter_flag", BRUSH_COLOR_JITTER_USE_VAL_RAND_PRESS);
3006 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3007 RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness");
3009
3010 prop = RNA_def_property(srna, "curve_random_hue", PROP_POINTER, PROP_NONE);
3011 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_hue");
3012 RNA_def_property_struct_type(prop, "CurveMapping");
3013 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
3015 RNA_def_property_update(prop, 0, "rna_Brush_update");
3016
3017 prop = RNA_def_property(srna, "curve_random_saturation", PROP_POINTER, PROP_NONE);
3018 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_saturation");
3019 RNA_def_property_struct_type(prop, "CurveMapping");
3020 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
3022 RNA_def_property_update(prop, 0, "rna_Brush_update");
3023
3024 prop = RNA_def_property(srna, "curve_random_value", PROP_POINTER, PROP_NONE);
3025 RNA_def_property_pointer_sdna(prop, nullptr, "curve_rand_value");
3026 RNA_def_property_struct_type(prop, "CurveMapping");
3027 RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect");
3029 RNA_def_property_update(prop, 0, "rna_Brush_update");
3030
3031 prop = RNA_def_property(srna, "curve_size", PROP_POINTER, PROP_NONE);
3032 RNA_def_property_pointer_sdna(prop, nullptr, "curve_size");
3033 RNA_def_property_struct_type(prop, "CurveMapping");
3035 prop, "Pressure Size Mapping", "Curve used to map pressure to brush size");
3037 RNA_def_property_update(prop, 0, "rna_Brush_update");
3038
3039 prop = RNA_def_property(srna, "curve_strength", PROP_POINTER, PROP_NONE);
3040 RNA_def_property_pointer_sdna(prop, nullptr, "curve_strength");
3041 RNA_def_property_struct_type(prop, "CurveMapping");
3043 prop, "Pressure Strength Mapping", "Curve used to map pressure to brush strength");
3045 RNA_def_property_update(prop, 0, "rna_Brush_update");
3046
3047 prop = RNA_def_property(srna, "curve_jitter", PROP_POINTER, PROP_NONE);
3048 RNA_def_property_pointer_sdna(prop, nullptr, "curve_jitter");
3049 RNA_def_property_struct_type(prop, "CurveMapping");
3051 prop, "Pressure Jitter Mapping", "Curve used to map pressure to brush jitter");
3053 RNA_def_property_update(prop, 0, "rna_Brush_update");
3054
3055 prop = RNA_def_property(srna, "curve_hardness", PROP_POINTER, PROP_NONE);
3056 RNA_def_property_pointer_sdna(prop, nullptr, "curve_hardness");
3057 RNA_def_property_struct_type(prop, "CurveMapping");
3059 prop, "Pressure Hardness Mapping", "Curve used to map pressure to brush hardness");
3061 RNA_def_property_update(prop, 0, "rna_Brush_update");
3062
3063 prop = RNA_def_property(srna, "curve_auto_smooth", PROP_POINTER, PROP_NONE);
3064 RNA_def_property_pointer_sdna(prop, nullptr, "curve_auto_smooth");
3065 RNA_def_property_struct_type(prop, "CurveMapping");
3067 prop, "Pressure Auto-Smooth Mapping", "Curve used to map pressure to brush auto-smooth");
3069 RNA_def_property_update(prop, 0, "rna_Brush_update");
3070
3071 prop = RNA_def_property(srna, "curve_spacing", PROP_POINTER, PROP_NONE);
3072 RNA_def_property_pointer_sdna(prop, nullptr, "curve_spacing");
3073 RNA_def_property_struct_type(prop, "CurveMapping");
3075 prop, "Pressure Spacing Mapping", "Curve used to map pressure to brush spacing");
3077 RNA_def_property_update(prop, 0, "rna_Brush_update");
3078
3079 prop = RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_PIXEL);
3080 RNA_def_property_range(prop, 10, 200);
3082 prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues");
3083 RNA_def_property_update(prop, 0, "rna_Brush_update");
3084
3085 prop = RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_FACTOR);
3086 RNA_def_property_range(prop, 0.5, 0.99);
3087 RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke");
3088 RNA_def_property_update(prop, 0, "rna_Brush_update");
3089
3090 prop = RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
3091 RNA_def_property_float_sdna(prop, nullptr, "rate");
3092 RNA_def_property_range(prop, 0.0001f, 10000.0f);
3093 RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 3);
3094 RNA_def_property_ui_text(prop, "Rate", "Interval between paints for Airbrush");
3095 RNA_def_property_update(prop, 0, "rna_Brush_update");
3096
3097 prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
3098 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3099 RNA_def_property_float_sdna(prop, nullptr, "color");
3100 RNA_def_property_ui_text(prop, "Color", "");
3101 RNA_def_property_update(prop, 0, "rna_Brush_color_update");
3102
3103 prop = RNA_def_property(srna, "secondary_color", PROP_FLOAT, PROP_COLOR);
3104 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3105 RNA_def_property_float_sdna(prop, nullptr, "secondary_color");
3106 RNA_def_property_ui_text(prop, "Secondary Color", "");
3107 RNA_def_property_update(prop, 0, "rna_Brush_color_update");
3108
3109 prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
3110 RNA_def_property_range(prop, 0.0f, 1.0f);
3111 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3112 RNA_def_property_ui_text(prop, "Weight", "Vertex weight when brush is applied");
3113 RNA_def_property_update(prop, 0, "rna_Brush_update");
3114
3115 prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
3116 RNA_def_property_float_sdna(prop, nullptr, "alpha");
3117 RNA_def_property_range(prop, 0.0f, 10.0f);
3118 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3120 prop, "Strength", "How powerful the effect of the brush is when applied");
3121 RNA_def_property_update(prop, 0, "rna_Brush_update");
3122
3123 prop = RNA_def_property(srna, "flow", PROP_FLOAT, PROP_FACTOR);
3124 RNA_def_property_float_sdna(prop, nullptr, "flow");
3125 RNA_def_property_range(prop, 0.0f, 1.0f);
3126 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3127 RNA_def_property_ui_text(prop, "Flow", "Amount of paint that is applied per stroke sample");
3128 RNA_def_property_update(prop, 0, "rna_Brush_update");
3129
3130 prop = RNA_def_property(srna, "wet_mix", PROP_FLOAT, PROP_FACTOR);
3131 RNA_def_property_float_sdna(prop, nullptr, "wet_mix");
3132 RNA_def_property_range(prop, 0.0f, 1.0f);
3133 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3135 prop, "Wet Mix", "Amount of paint that is picked from the surface into the brush color");
3136 RNA_def_property_update(prop, 0, "rna_Brush_update");
3137
3138 prop = RNA_def_property(srna, "wet_persistence", PROP_FLOAT, PROP_FACTOR);
3139 RNA_def_property_float_sdna(prop, nullptr, "wet_persistence");
3140 RNA_def_property_range(prop, 0.0f, 1.0f);
3141 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3143 prop,
3144 "Wet Persistence",
3145 "Amount of wet paint that stays in the brush after applying paint to the surface");
3146 RNA_def_property_update(prop, 0, "rna_Brush_update");
3147
3148 prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
3149 RNA_def_property_float_sdna(prop, nullptr, "density");
3150 RNA_def_property_range(prop, 0.0f, 1.0f);
3151 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3153 prop, "Density", "Amount of random elements that are going to be affected by the brush");
3154 RNA_def_property_update(prop, 0, "rna_Brush_update");
3155
3156 prop = RNA_def_property(srna, "tip_scale_x", PROP_FLOAT, PROP_FACTOR);
3157 RNA_def_property_float_sdna(prop, nullptr, "tip_scale_x");
3158 RNA_def_property_range(prop, 0.0001f, 1.0f);
3159 RNA_def_property_ui_range(prop, 0.0001f, 1.0f, 0.001, 3);
3160 RNA_def_property_ui_text(prop, "Tip Scale X", "Scale of the brush tip in the X axis");
3161 RNA_def_property_update(prop, 0, "rna_Brush_update");
3162
3163 prop = RNA_def_property(srna, "use_hardness_pressure", PROP_BOOLEAN, PROP_NONE);
3165 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3166 RNA_def_property_ui_text(prop, "Use Pressure for Hardness", "Use pressure to modulate hardness");
3168 RNA_def_property_update(prop, 0, "rna_Brush_update");
3169
3170 prop = RNA_def_property(srna, "invert_hardness_pressure", PROP_BOOLEAN, PROP_NONE);
3171 RNA_def_property_boolean_sdna(prop, nullptr, "paint_flags", BRUSH_PAINT_UNUSED_2);
3172 RNA_def_property_ui_icon(prop, ICON_ARROW_LEFTRIGHT, 0);
3174 prop, "Invert Pressure for Hardness", "Invert the modulation of pressure in hardness");
3176 RNA_def_property_update(prop, 0, "rna_Brush_update");
3177 RNA_def_property_deprecated(prop, "Replaced by pressure curves.", 503, 600);
3178
3179 prop = RNA_def_property(srna, "use_flow_pressure", PROP_BOOLEAN, PROP_NONE);
3180 RNA_def_property_boolean_sdna(prop, nullptr, "paint_flags", BRUSH_PAINT_FLOW_PRESSURE);
3181 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3182 RNA_def_property_ui_text(prop, "Use Pressure for Flow", "Use pressure to modulate flow");
3184 RNA_def_property_update(prop, 0, "rna_Brush_update");
3185
3186 prop = RNA_def_property(srna, "invert_flow_pressure", PROP_BOOLEAN, PROP_NONE);
3188 RNA_def_property_ui_icon(prop, ICON_ARROW_LEFTRIGHT, 0);
3190 prop, "Invert Pressure for Flow", "Invert the modulation of pressure in flow");
3192 RNA_def_property_update(prop, 0, "rna_Brush_update");
3193
3194 prop = RNA_def_property(srna, "use_wet_mix_pressure", PROP_BOOLEAN, PROP_NONE);
3195 RNA_def_property_boolean_sdna(prop, nullptr, "paint_flags", BRUSH_PAINT_WET_MIX_PRESSURE);
3196 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3197 RNA_def_property_ui_text(prop, "Use Pressure for Wet Mix", "Use pressure to modulate wet mix");
3199 RNA_def_property_update(prop, 0, "rna_Brush_update");
3200
3201 prop = RNA_def_property(srna, "invert_wet_mix_pressure", PROP_BOOLEAN, PROP_NONE);
3203 RNA_def_property_ui_icon(prop, ICON_ARROW_LEFTRIGHT, 0);
3205 prop, "Invert Pressure for Wet Mix", "Invert the modulation of pressure in wet mix");
3207 RNA_def_property_update(prop, 0, "rna_Brush_update");
3208
3209 prop = RNA_def_property(srna, "use_wet_persistence_pressure", PROP_BOOLEAN, PROP_NONE);
3211 prop, nullptr, "paint_flags", BRUSH_PAINT_WET_PERSISTENCE_PRESSURE);
3212 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3214 prop, "Use Pressure for Wet Persistence", "Use pressure to modulate wet persistence");
3216 RNA_def_property_update(prop, 0, "rna_Brush_update");
3217
3218 prop = RNA_def_property(srna, "invert_wet_persistence_pressure", PROP_BOOLEAN, PROP_NONE);
3220 prop, nullptr, "paint_flags", BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT);
3221 RNA_def_property_ui_icon(prop, ICON_ARROW_LEFTRIGHT, 0);
3223 "Invert Pressure for Wet Persistence",
3224 "Invert the modulation of pressure in wet persistence");
3226 RNA_def_property_update(prop, 0, "rna_Brush_update");
3227
3228 prop = RNA_def_property(srna, "use_density_pressure", PROP_BOOLEAN, PROP_NONE);
3229 RNA_def_property_boolean_sdna(prop, nullptr, "paint_flags", BRUSH_PAINT_DENSITY_PRESSURE);
3230 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3231 RNA_def_property_ui_text(prop, "Use Pressure for Density", "Use pressure to modulate density");
3233 RNA_def_property_update(prop, 0, "rna_Brush_update");
3234
3235 prop = RNA_def_property(srna, "invert_density_pressure", PROP_BOOLEAN, PROP_NONE);
3237 RNA_def_property_ui_icon(prop, ICON_ARROW_LEFTRIGHT, 0);
3239 prop, "Invert Pressure for Density", "Invert the modulation of pressure in density");
3241 RNA_def_property_update(prop, 0, "rna_Brush_update");
3242
3243 prop = RNA_def_property(srna, "dash_ratio", PROP_FLOAT, PROP_FACTOR);
3244 RNA_def_property_float_sdna(prop, nullptr, "dash_ratio");
3245 RNA_def_property_range(prop, 0.0f, 1.0f);
3246 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3248 prop, "Dash Ratio", "Ratio of samples in a cycle that the brush is enabled");
3249 RNA_def_property_update(prop, 0, "rna_Brush_update");
3250
3251 prop = RNA_def_property(srna, "dash_samples", PROP_INT, PROP_UNSIGNED);
3252 RNA_def_property_int_sdna(prop, nullptr, "dash_samples");
3253 RNA_def_property_range(prop, 1, 10000);
3254 RNA_def_property_ui_range(prop, 1, 10000, 5, -1);
3256 prop, "Dash Length", "Length of a dash cycle measured in stroke samples");
3257 RNA_def_property_update(prop, 0, "rna_Brush_update");
3258
3259 prop = RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_NONE);
3260 RNA_def_property_float_sdna(prop, nullptr, "plane_offset");
3262 RNA_def_property_range(prop, -2.0f, 2.0f);
3263 RNA_def_property_ui_range(prop, -0.5f, 0.5f, 0.001, 3);
3265 prop,
3266 "Plane Offset",
3267 "Adjust plane on which the brush acts towards or away from the object surface");
3268 RNA_def_property_update(prop, 0, "rna_Brush_update");
3269
3270 prop = RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_NONE);
3271 RNA_def_property_float_sdna(prop, nullptr, "plane_trim");
3272 RNA_def_property_range(prop, 0, 1.0f);
3274 prop,
3275 "Plane Trim",
3276 "If a vertex is further away from offset plane than this, then it is not affected");
3277 RNA_def_property_update(prop, 0, "rna_Brush_update");
3278
3279 prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
3280 RNA_def_property_float_sdna(prop, nullptr, "height");
3282 RNA_def_property_range(prop, 0, 1.0f);
3283 RNA_def_property_ui_range(prop, 0, 0.2f, 1, 3);
3285 prop,
3286 "Brush Height",
3287 "Affectable height of brush (i.e. the layer height for the layer tool)");
3288 RNA_def_property_update(prop, 0, "rna_Brush_update");
3289
3290 prop = RNA_def_property(srna, "plane_depth", PROP_FLOAT, PROP_FACTOR);
3291 RNA_def_property_float_sdna(prop, nullptr, "plane_depth");
3293 RNA_def_property_range(prop, 0, 1.0f);
3294 RNA_def_property_ui_range(prop, 0, 1.0f, 1, 3);
3296 "Depth",
3297 "The maximum distance below the plane for affected vertices. "
3298 "Increasing the depth affects vertices farther below the plane.");
3299 RNA_def_property_update(prop, 0, "rna_Brush_update");
3300
3301 prop = RNA_def_property(srna, "plane_height", PROP_FLOAT, PROP_FACTOR);
3302 RNA_def_property_float_sdna(prop, nullptr, "plane_height");
3304 RNA_def_property_range(prop, 0, 1.0f);
3305 RNA_def_property_ui_range(prop, 0, 1.0f, 1, 3);
3307 "Height",
3308 "The maximum distance above the plane for affected vertices. "
3309 "Increasing the height affects vertices farther above the plane.");
3310 RNA_def_property_update(prop, 0, "rna_Brush_update");
3311
3312 prop = RNA_def_property(srna, "stabilize_normal", PROP_FLOAT, PROP_FACTOR);
3313 RNA_def_property_float_sdna(prop, nullptr, "stabilize_normal");
3315 RNA_def_property_range(prop, 0, 1.0f);
3316 RNA_def_property_ui_range(prop, 0, 1.0f, 1, 3);
3318 "Stabilize Normal",
3319 "How stable the plane normal is over the course of the stroke. "
3320 "A value of 0 corresponds to using the current normal, "
3321 "and a value of 1 corresponds to using the initial normal.");
3322 RNA_def_property_update(prop, 0, "rna_Brush_update");
3323
3324 prop = RNA_def_property(srna, "stabilize_plane", PROP_FLOAT, PROP_FACTOR);
3325 RNA_def_property_float_sdna(prop, nullptr, "stabilize_plane");
3327 RNA_def_property_range(prop, 0, 1.0f);
3328 RNA_def_property_ui_range(prop, 0, 1.0f, 1, 3);
3330 "Stabilize Center",
3331 "How stable the plane center is over the course of the stroke. "
3332 "A value of 0 corresponds to using the current center, "
3333 "and a value of 1 corresponds to using the initial center.");
3334 RNA_def_property_update(prop, 0, "rna_Brush_update");
3335
3336 prop = RNA_def_property(srna, "texture_sample_bias", PROP_FLOAT, PROP_FACTOR);
3337 RNA_def_property_float_sdna(prop, nullptr, "texture_sample_bias");
3339 RNA_def_property_range(prop, -1, 1);
3340 RNA_def_property_ui_text(prop, "Texture Sample Bias", "Value added to texture samples");
3341 RNA_def_property_update(prop, 0, "rna_Brush_update");
3342
3343 prop = RNA_def_property(srna, "use_color_as_displacement", PROP_BOOLEAN, PROP_NONE);
3346 prop,
3347 "Vector Displacement",
3348 "Handle each pixel color as individual vector for displacement (area plane mapping only)");
3349 RNA_def_property_update(prop, 0, "rna_Brush_update");
3350
3351 prop = RNA_def_property(srna, "normal_weight", PROP_FLOAT, PROP_FACTOR);
3352 RNA_def_property_float_sdna(prop, nullptr, "normal_weight");
3354 RNA_def_property_range(prop, 0.0f, 1.0f);
3356 prop, "Normal Weight", "How much grab will pull vertices out of surface during a grab");
3357 RNA_def_property_update(prop, 0, "rna_Brush_update");
3358
3359 prop = RNA_def_property(srna, "elastic_deform_volume_preservation", PROP_FLOAT, PROP_NONE);
3360 RNA_def_property_float_sdna(prop, nullptr, "elastic_deform_volume_preservation");
3361 RNA_def_property_range(prop, 0.0f, 0.9f);
3362 RNA_def_property_ui_range(prop, 0.0f, 0.9f, 0.01f, 3);
3364 "Volume Preservation",
3365 "Poisson ratio for elastic deformation. Higher values preserve volume "
3366 "more, but also lead to more bulging.");
3367 RNA_def_property_update(prop, 0, "rna_Brush_update");
3368
3369 prop = RNA_def_property(srna, "rake_factor", PROP_FLOAT, PROP_FACTOR);
3370 RNA_def_property_float_sdna(prop, nullptr, "rake_factor");
3372 RNA_def_property_range(prop, 0.0f, 10.0f);
3373 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3374 RNA_def_property_ui_text(prop, "Rake", "How much grab will follow cursor rotation");
3375 RNA_def_property_update(prop, 0, "rna_Brush_update");
3376
3377 prop = RNA_def_property(srna, "crease_pinch_factor", PROP_FLOAT, PROP_FACTOR);
3378 RNA_def_property_float_sdna(prop, nullptr, "crease_pinch_factor");
3379 RNA_def_property_range(prop, 0.0f, 1.0f);
3380 RNA_def_property_ui_text(prop, "Crease Brush Pinch Factor", "How much the crease brush pinches");
3381 RNA_def_property_update(prop, 0, "rna_Brush_update");
3382
3383 prop = RNA_def_property(srna, "pose_offset", PROP_FLOAT, PROP_FACTOR);
3384 RNA_def_property_float_sdna(prop, nullptr, "pose_offset");
3385 RNA_def_property_range(prop, 0.0f, 2.0f);
3387 prop, "Pose Origin Offset", "Offset of the pose origin in relation to the brush radius");
3388 RNA_def_property_update(prop, 0, "rna_Brush_update");
3389
3390 prop = RNA_def_property(srna, "disconnected_distance_max", PROP_FLOAT, PROP_DISTANCE);
3391 RNA_def_property_float_sdna(prop, nullptr, "disconnected_distance_max");
3392 RNA_def_property_range(prop, 0.0f, 10.0f);
3394 "Max Element Distance",
3395 "Maximum distance to search for disconnected loose parts in the mesh");
3396 RNA_def_property_update(prop, 0, "rna_Brush_update");
3397
3398 prop = RNA_def_property(srna, "boundary_offset", PROP_FLOAT, PROP_FACTOR);
3399 RNA_def_property_float_sdna(prop, nullptr, "boundary_offset");
3400 RNA_def_property_range(prop, 0.0f, 30.0f);
3402 "Boundary Origin Offset",
3403 "Offset of the boundary origin in relation to the brush radius");
3404 RNA_def_property_update(prop, 0, "rna_Brush_update");
3405
3406 prop = RNA_def_property(srna, "surface_smooth_shape_preservation", PROP_FLOAT, PROP_FACTOR);
3407 RNA_def_property_float_sdna(prop, nullptr, "surface_smooth_shape_preservation");
3408 RNA_def_property_range(prop, 0.0f, 1.0f);
3410 prop, "Shape Preservation", "How much of the original shape is preserved when smoothing");
3411 RNA_def_property_update(prop, 0, "rna_Brush_update");
3412
3413 prop = RNA_def_property(srna, "surface_smooth_current_vertex", PROP_FLOAT, PROP_FACTOR);
3414 RNA_def_property_float_sdna(prop, nullptr, "surface_smooth_current_vertex");
3415 RNA_def_property_range(prop, 0.0f, 1.0f);
3417 prop,
3418 "Per Vertex Displacement",
3419 "How much the position of each individual vertex influences the final result");
3420 RNA_def_property_update(prop, 0, "rna_Brush_update");
3421
3422 prop = RNA_def_property(srna, "surface_smooth_iterations", PROP_INT, PROP_UNSIGNED);
3423 RNA_def_property_int_sdna(prop, nullptr, "surface_smooth_iterations");
3424 RNA_def_property_range(prop, 1, 10);
3425 RNA_def_property_ui_range(prop, 1, 10, 1, 3);
3426 RNA_def_property_ui_text(prop, "Iterations", "Number of smoothing iterations per brush step");
3427 RNA_def_property_update(prop, 0, "rna_Brush_update");
3428
3429 prop = RNA_def_property(srna, "multiplane_scrape_angle", PROP_FLOAT, PROP_FACTOR);
3430 RNA_def_property_float_sdna(prop, nullptr, "multiplane_scrape_angle");
3431 RNA_def_property_range(prop, 0.0f, 160.0f);
3432 RNA_def_property_ui_text(prop, "Plane Angle", "Angle between the planes of the crease");
3433 RNA_def_property_update(prop, 0, "rna_Brush_update");
3434
3435 prop = RNA_def_property(srna, "pose_smooth_iterations", PROP_INT, PROP_UNSIGNED);
3436 RNA_def_property_int_sdna(prop, nullptr, "pose_smooth_iterations");
3437 RNA_def_property_range(prop, 0, 100);
3439 prop,
3440 "Smooth Iterations",
3441 "Smooth iterations applied after calculating the pose factor of each vertex");
3442 RNA_def_property_update(prop, 0, "rna_Brush_update");
3443
3444 prop = RNA_def_property(srna, "pose_ik_segments", PROP_INT, PROP_UNSIGNED);
3445 RNA_def_property_int_sdna(prop, nullptr, "pose_ik_segments");
3446 RNA_def_property_range(prop, 1, 20);
3447 RNA_def_property_ui_range(prop, 1, 20, 1, 3);
3449 prop,
3450 "Pose IK Segments",
3451 "Number of segments of the inverse kinematics chain that will deform the mesh");
3452 RNA_def_property_update(prop, 0, "rna_Brush_update");
3453
3454 prop = RNA_def_property(srna, "tip_roundness", PROP_FLOAT, PROP_FACTOR);
3455 RNA_def_property_float_sdna(prop, nullptr, "tip_roundness");
3456 RNA_def_property_range(prop, 0.0f, 1.0f);
3457 RNA_def_property_ui_text(prop, "Tip Roundness", "Roundness of the brush tip");
3458 RNA_def_property_update(prop, 0, "rna_Brush_update");
3459
3460 prop = RNA_def_property(srna, "cloth_mass", PROP_FLOAT, PROP_FACTOR);
3461 RNA_def_property_float_sdna(prop, nullptr, "cloth_mass");
3462 RNA_def_property_range(prop, 0.01f, 2.0f);
3463 RNA_def_property_ui_text(prop, "Cloth Mass", "Mass of each simulation particle");
3464 RNA_def_property_update(prop, 0, "rna_Brush_update");
3465
3466 prop = RNA_def_property(srna, "cloth_damping", PROP_FLOAT, PROP_FACTOR);
3467 RNA_def_property_float_sdna(prop, nullptr, "cloth_damping");
3468 RNA_def_property_range(prop, 0.01f, 1.0f);
3470 prop, "Cloth Damping", "How much the applied forces are propagated through the cloth");
3471 RNA_def_property_update(prop, 0, "rna_Brush_update");
3472
3473 prop = RNA_def_property(srna, "cloth_sim_limit", PROP_FLOAT, PROP_FACTOR);
3474 RNA_def_property_float_sdna(prop, nullptr, "cloth_sim_limit");
3475 RNA_def_property_range(prop, 0.1f, 10.0f);
3477 prop,
3478 "Simulation Limit",
3479 "Factor added relative to the size of the radius to limit the cloth simulation effects");
3480 RNA_def_property_update(prop, 0, "rna_Brush_update");
3481
3482 prop = RNA_def_property(srna, "cloth_sim_falloff", PROP_FLOAT, PROP_FACTOR);
3483 RNA_def_property_float_sdna(prop, nullptr, "cloth_sim_falloff");
3484 RNA_def_property_range(prop, 0.0f, 1.0f);
3486 "Simulation Falloff",
3487 "Area to apply deformation falloff to the effects of the simulation");
3488 RNA_def_property_update(prop, 0, "rna_Brush_update");
3489
3490 prop = RNA_def_property(srna, "cloth_constraint_softbody_strength", PROP_FLOAT, PROP_FACTOR);
3491 RNA_def_property_float_sdna(prop, nullptr, "cloth_constraint_softbody_strength");
3492 RNA_def_property_range(prop, 0.0f, 1.0f);
3494 prop,
3495 "Soft Body Plasticity",
3496 "How much the cloth preserves the original shape, acting as a soft body");
3497 RNA_def_property_update(prop, 0, "rna_Brush_update");
3498
3499 prop = RNA_def_property(srna, "hardness", PROP_FLOAT, PROP_FACTOR);
3500 RNA_def_property_float_sdna(prop, nullptr, "hardness");
3501 RNA_def_property_range(prop, 0.0f, 1.0f);
3503 prop, "Hardness", "How close the brush falloff starts from the edge of the brush");
3504 RNA_def_property_update(prop, 0, "rna_Brush_update");
3505
3506 prop = RNA_def_property(srna, "auto_smooth_factor", PROP_FLOAT, PROP_FACTOR);
3507 RNA_def_property_float_sdna(prop, nullptr, "autosmooth_factor");
3509 RNA_def_property_range(prop, 0.0f, 1.0f);
3510 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3512 prop, "Auto-Smooth", "Amount of smoothing to automatically apply to each stroke");
3513 RNA_def_property_update(prop, 0, "rna_Brush_update");
3514
3515 prop = RNA_def_property(srna, "topology_rake_factor", PROP_FLOAT, PROP_FACTOR);
3516 RNA_def_property_float_sdna(prop, nullptr, "topology_rake_factor");
3518 RNA_def_property_range(prop, 0.0f, 1.0f);
3519 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3521 "Topology Rake",
3522 "Automatically align edges to the brush direction to "
3523 "generate cleaner topology and define sharp features. "
3524 "Best used on low-poly meshes as it has a performance impact.");
3525 RNA_def_property_update(prop, 0, "rna_Brush_update");
3526
3527 prop = RNA_def_property(srna, "tilt_strength_factor", PROP_FLOAT, PROP_FACTOR);
3528 RNA_def_property_float_sdna(prop, nullptr, "tilt_strength_factor");
3530 RNA_def_property_range(prop, -1.0f, 1.0f);
3531 RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.001, 3);
3533 "Tilt Strength",
3534 "How much the tilt of the pen will affect the brush. Negative values "
3535 "indicate inverting the tilt directions.");
3536 RNA_def_property_update(prop, 0, "rna_Brush_update");
3537
3538 prop = RNA_def_property(srna, "normal_radius_factor", PROP_FLOAT, PROP_FACTOR);
3539 RNA_def_property_float_sdna(prop, nullptr, "normal_radius_factor");
3540 RNA_def_property_range(prop, 0.0f, 2.0f);
3541 RNA_def_property_ui_range(prop, 0.0f, 2.0f, 0.001, 3);
3543 "Normal Radius",
3544 "Ratio between the brush radius and the radius that is going to be "
3545 "used to sample the normal");
3546 RNA_def_property_update(prop, 0, "rna_Brush_update");
3547
3548 prop = RNA_def_property(srna, "area_radius_factor", PROP_FLOAT, PROP_FACTOR);
3549 RNA_def_property_float_sdna(prop, nullptr, "area_radius_factor");
3550 RNA_def_property_range(prop, 0.0f, 2.0f);
3551 RNA_def_property_ui_range(prop, 0.0f, 2.0f, 0.001, 3);
3553 "Area Radius",
3554 "Ratio between the brush radius and the radius that is going to be "
3555 "used to sample the area center");
3556 RNA_def_property_update(prop, 0, "rna_Brush_update");
3557
3558 prop = RNA_def_property(srna, "wet_paint_radius_factor", PROP_FLOAT, PROP_FACTOR);
3559 RNA_def_property_float_sdna(prop, nullptr, "wet_paint_radius_factor");
3560 RNA_def_property_range(prop, 0.0f, 2.0f);
3561 RNA_def_property_ui_range(prop, 0.0f, 2.0f, 0.001, 3);
3563 "Wet Paint Radius",
3564 "Ratio between the brush radius and the radius that is going to be "
3565 "used to sample the color to blend in wet paint");
3566 RNA_def_property_update(prop, 0, "rna_Brush_update");
3567
3568 prop = RNA_def_property(srna, "stencil_pos", PROP_FLOAT, PROP_XYZ);
3569 RNA_def_property_float_sdna(prop, nullptr, "stencil_pos");
3570 RNA_def_property_array(prop, 2);
3571 RNA_def_property_ui_text(prop, "Stencil Position", "Position of stencil in viewport");
3572 RNA_def_property_update(prop, 0, "rna_Brush_update");
3573
3574 prop = RNA_def_property(srna, "stencil_dimension", PROP_FLOAT, PROP_XYZ);
3575 RNA_def_property_float_sdna(prop, nullptr, "stencil_dimension");
3576 RNA_def_property_array(prop, 2);
3577 RNA_def_property_ui_text(prop, "Stencil Dimensions", "Dimensions of stencil in viewport");
3578 RNA_def_property_update(prop, 0, "rna_Brush_update");
3579
3580 prop = RNA_def_property(srna, "mask_stencil_pos", PROP_FLOAT, PROP_XYZ);
3581 RNA_def_property_float_sdna(prop, nullptr, "mask_stencil_pos");
3582 RNA_def_property_array(prop, 2);
3583 RNA_def_property_ui_text(prop, "Mask Stencil Position", "Position of mask stencil in viewport");
3584 RNA_def_property_update(prop, 0, "rna_Brush_update");
3585
3586 prop = RNA_def_property(srna, "mask_stencil_dimension", PROP_FLOAT, PROP_XYZ);
3587 RNA_def_property_float_sdna(prop, nullptr, "mask_stencil_dimension");
3588 RNA_def_property_array(prop, 2);
3590 prop, "Mask Stencil Dimensions", "Dimensions of mask stencil in viewport");
3591 RNA_def_property_update(prop, 0, "rna_Brush_update");
3592
3593 prop = RNA_def_property(srna, "sharp_threshold", PROP_FLOAT, PROP_NONE);
3594 RNA_def_property_range(prop, 0.0, 100.0);
3595 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
3596 RNA_def_property_float_sdna(prop, nullptr, "sharp_threshold");
3598 prop, "Sharp Threshold", "Threshold below which, no sharpening is done");
3599 RNA_def_property_update(prop, 0, "rna_Brush_update");
3600
3601 prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_NONE);
3602 RNA_def_property_range(prop, 0.0, 100.0);
3603 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
3604 RNA_def_property_float_sdna(prop, nullptr, "fill_threshold");
3606 prop, "Fill Threshold", "Threshold above which filling is not propagated");
3607 RNA_def_property_update(prop, 0, "rna_Brush_update");
3608
3609 prop = RNA_def_property(srna, "blur_kernel_radius", PROP_INT, PROP_NONE);
3610 RNA_def_property_int_sdna(prop, nullptr, "blur_kernel_radius");
3611 RNA_def_property_range(prop, 1, 10000);
3612 RNA_def_property_ui_range(prop, 1, 50, 1, -1);
3614 prop, "Kernel Radius", "Radius of kernel used for soften and sharpen in pixels");
3615 RNA_def_property_update(prop, 0, "rna_Brush_update");
3616
3617 prop = RNA_def_property(srna, "blur_mode", PROP_ENUM, PROP_NONE);
3618 RNA_def_property_enum_items(prop, brush_blur_mode_items);
3619 RNA_def_property_ui_text(prop, "Blur Mode", "");
3620 RNA_def_property_update(prop, 0, "rna_Brush_update");
3621
3622 prop = RNA_def_property(srna, "falloff_angle", PROP_FLOAT, PROP_ANGLE);
3623 RNA_def_property_deprecated(prop, "Automasking 'View Normal' should be used instead", 503, 600);
3624 RNA_def_property_float_sdna(prop, nullptr, "falloff_angle_legacy");
3627 prop,
3628 "Falloff Angle",
3629 "Paint most on faces pointing towards the view according to this angle");
3630 RNA_def_property_update(prop, 0, "rna_Brush_update");
3631
3632 /* flag */
3633 prop = RNA_def_property(srna, "use_original_normal", PROP_BOOLEAN, PROP_NONE);
3636 "Original Normal",
3637 "When locked keep using normal of surface where stroke was initiated");
3638 RNA_def_property_update(prop, 0, "rna_Brush_update");
3639
3640 prop = RNA_def_property(srna, "use_original_plane", PROP_BOOLEAN, PROP_NONE);
3643 prop,
3644 "Original Plane",
3645 "When locked keep using the plane origin of surface where stroke was initiated");
3646 RNA_def_property_update(prop, 0, "rna_Brush_update");
3647
3648 prop = RNA_def_property(srna, "use_scene_spacing", PROP_ENUM, PROP_NONE);
3649 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
3650 RNA_def_property_enum_items(prop, brush_spacing_unit_items);
3652 prop, "Spacing Distance", "Calculate the brush spacing using view or scene distance");
3653 RNA_def_property_update(prop, 0, "rna_Brush_update");
3654
3655 prop = RNA_def_property(srna, "use_grab_active_vertex", PROP_BOOLEAN, PROP_NONE);
3658 prop,
3659 "Grab Active Vertex",
3660 "Apply the maximum grab strength to the active vertex instead of the cursor location");
3661 RNA_def_property_update(prop, 0, "rna_Brush_update");
3662
3663 prop = RNA_def_property(srna, "use_grab_silhouette", PROP_BOOLEAN, PROP_NONE);
3666 prop, "Grab Silhouette", "Grabs trying to automask the silhouette of the object");
3667 RNA_def_property_update(prop, 0, "rna_Brush_update");
3668
3669 prop = RNA_def_property(srna, "use_paint_antialiasing", PROP_BOOLEAN, PROP_NONE);
3670 RNA_def_property_boolean_sdna(prop, nullptr, "sampling_flag", BRUSH_PAINT_ANTIALIASING);
3671 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Smooths the edges of the strokes");
3672 RNA_def_property_update(prop, 0, "rna_Brush_update");
3673
3674 prop = RNA_def_property(srna, "use_multiplane_scrape_dynamic", PROP_BOOLEAN, PROP_NONE);
3677 "Dynamic Mode",
3678 "The angle between the planes changes during the stroke to fit the "
3679 "surface under the cursor");
3680 RNA_def_property_update(prop, 0, "rna_Brush_update");
3681
3682 prop = RNA_def_property(srna, "show_multiplane_scrape_planes_preview", PROP_BOOLEAN, PROP_NONE);
3685 prop, "Show Cursor Preview", "Preview the scrape planes in the cursor during the stroke");
3686 RNA_def_property_update(prop, 0, "rna_Brush_update");
3687
3688 prop = RNA_def_property(srna, "use_pose_ik_anchored", PROP_BOOLEAN, PROP_NONE);
3691 prop, "Keep Anchor Point", "Keep the position of the last segment in the IK chain fixed");
3692 RNA_def_property_update(prop, 0, "rna_Brush_update");
3693
3694 prop = RNA_def_property(srna, "use_pose_lock_rotation", PROP_BOOLEAN, PROP_NONE);
3697 "Lock Rotation When Scaling",
3698 "Do not rotate the segment when using the scale deform mode");
3699 RNA_def_property_update(prop, 0, "rna_Brush_update");
3700
3701 prop = RNA_def_property(srna, "use_connected_only", PROP_BOOLEAN, PROP_NONE);
3703 RNA_def_property_ui_text(prop, "Connected Only", "Affect only topologically connected elements");
3704 RNA_def_property_update(prop, 0, "rna_Brush_update");
3705
3706 prop = RNA_def_property(srna, "use_cloth_pin_simulation_boundary", PROP_BOOLEAN, PROP_NONE);
3709 prop,
3710 "Pin Simulation Boundary",
3711 "Lock the position of the vertices in the simulation falloff area to avoid artifacts and "
3712 "create a softer transition with unaffected areas");
3713 RNA_def_property_update(prop, 0, "rna_Brush_update");
3714
3715 prop = RNA_def_property(srna, "use_cloth_collision", PROP_BOOLEAN, PROP_NONE);
3717 RNA_def_property_ui_text(prop, "Enable Collision", "Collide with objects during the simulation");
3718 RNA_def_property_update(prop, 0, "rna_Brush_update");
3719
3720 prop = RNA_def_property(srna, "invert_to_scrape_fill", PROP_BOOLEAN, PROP_NONE);
3723 "Invert to Scrape or Fill",
3724 "Use Scrape or Fill brush when inverting this brush instead of "
3725 "inverting its displacement direction");
3726 RNA_def_property_update(prop, 0, "rna_Brush_update");
3727
3728 prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
3730 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3732 prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
3733 RNA_def_property_update(prop, 0, "rna_Brush_update");
3734
3735 prop = RNA_def_property(srna, "use_offset_pressure", PROP_BOOLEAN, PROP_NONE);
3737 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3739 prop, "Plane Offset Pressure", "Enable tablet pressure sensitivity for offset");
3740 RNA_def_property_update(prop, 0, "rna_Brush_update");
3741
3742 prop = RNA_def_property(srna, "use_pressure_area_radius", PROP_BOOLEAN, PROP_NONE);
3744 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3746 prop, "Area Radius Pressure", "Enable tablet pressure sensitivity for area radius");
3747 RNA_def_property_update(prop, 0, "rna_Brush_update");
3748
3749 prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
3750 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_SIZE_PRESSURE);
3751 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3752 RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
3753 RNA_def_property_update(prop, 0, "rna_Brush_update");
3754
3755 prop = RNA_def_property(srna, "use_pressure_jitter", PROP_BOOLEAN, PROP_NONE);
3757 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3759 prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter");
3760 RNA_def_property_update(prop, 0, "rna_Brush_update");
3761
3762 prop = RNA_def_property(srna, "use_pressure_spacing", PROP_BOOLEAN, PROP_NONE);
3764 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3766 prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing");
3767 RNA_def_property_update(prop, 0, "rna_Brush_update");
3768
3769 prop = RNA_def_property(srna, "use_pressure_masking", PROP_ENUM, PROP_NONE);
3770 RNA_def_property_enum_sdna(prop, nullptr, "mask_pressure");
3771 RNA_def_property_enum_items(prop, brush_mask_pressure_items);
3773 prop, "Mask Pressure Mode", "Pen pressure makes texture influence smaller");
3774 RNA_def_property_update(prop, 0, "rna_Brush_update");
3775
3776 prop = RNA_def_property(srna, "use_smooth_pressure", PROP_BOOLEAN, PROP_NONE);
3778 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3779 RNA_def_property_ui_text(prop, "Smooth Pressure", "Use pressure to modulate auto-smoothing.");
3780 RNA_def_property_update(prop, 0, "rna_Brush_update");
3781
3782 prop = RNA_def_property(srna, "use_plane_trim", PROP_BOOLEAN, PROP_NONE);
3783 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_PLANE_TRIM);
3785 prop,
3786 "Use Plane Trim",
3787 "Limit the distance from the offset plane that a vertex can be affected");
3788 RNA_def_property_update(prop, 0, "rna_Brush_update");
3789
3790 prop = RNA_def_property(srna, "use_frontface", PROP_BOOLEAN, PROP_NONE);
3791 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_FRONTFACE);
3793 prop, "Use Front-Face", "Brush only affects vertices that face the viewer");
3794 RNA_def_property_update(prop, 0, "rna_Brush_update");
3795
3796 prop = RNA_def_property(srna, "use_frontface_falloff", PROP_BOOLEAN, PROP_NONE);
3797 RNA_def_property_deprecated(prop, "Automasking 'View Normal' should be used instead", 503, 600);
3798 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_UNUSED_7);
3800 prop, "Use Front-Face Falloff", "Blend brush influence by how much they face the front");
3801 RNA_def_property_update(prop, 0, "rna_Brush_update");
3802
3803 prop = RNA_def_property(srna, "use_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
3804 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_SMOOTH_STROKE);
3806 prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path");
3807 RNA_def_property_update(prop, 0, "rna_Brush_update");
3808
3809 prop = RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
3810 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_PERSISTENT);
3811 RNA_def_property_ui_text(prop, "Persistent", "Sculpt on a persistent layer of the mesh");
3812 RNA_def_property_update(prop, 0, "rna_Brush_update");
3813
3814 prop = RNA_def_property(srna, "use_bidirectional", PROP_BOOLEAN, PROP_NONE);
3817 "Bidirectional",
3818 "Project vertices both along the projection direction and its "
3819 "inverse, choosing the closest intersection.");
3820 RNA_def_property_update(prop, 0, "rna_Brush_update");
3821
3822 prop = RNA_def_property(srna, "use_accumulate", PROP_BOOLEAN, PROP_NONE);
3823 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_ACCUMULATE);
3824 RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke daubs on top of each other");
3825 RNA_def_property_update(prop, 0, "rna_Brush_update");
3826
3827 prop = RNA_def_property(srna, "use_space_attenuation", PROP_BOOLEAN, PROP_NONE);
3828 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_SPACE_ATTEN);
3830 prop,
3831 "Adjust Strength for Spacing",
3832 "Automatically adjust strength to give consistent results for different spacings");
3833 RNA_def_property_update(prop, 0, "rna_Brush_update");
3834
3835 /* adaptive space is not implemented yet */
3836 prop = RNA_def_property(srna, "use_adaptive_space", PROP_BOOLEAN, PROP_NONE);
3839 "Adaptive Spacing",
3840 "Space daubs according to surface orientation instead of screen space");
3841 RNA_def_property_update(prop, 0, "rna_Brush_update");
3842
3843 prop = RNA_def_property(srna, "use_locked_size", PROP_ENUM, PROP_NONE); /* as an enum */
3844 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
3845 RNA_def_property_enum_items(prop, brush_size_unit_items);
3847 prop, "Size Unit", "Measure brush size relative to the view or the scene");
3848 RNA_def_property_update(prop, 0, "rna_Brush_update");
3849
3850 prop = RNA_def_property(srna, "color_type", PROP_ENUM, PROP_NONE); /* as an enum */
3851 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
3852 RNA_def_property_enum_items(prop, color_gradient_items);
3853 RNA_def_property_enum_funcs(prop, nullptr, "rna_Brush_use_gradient_set", nullptr);
3854 RNA_def_property_ui_text(prop, "Color Type", "Use single color or gradient when painting");
3855 RNA_def_property_update(prop, 0, "rna_Brush_update");
3856
3857 prop = RNA_def_property(srna, "use_edge_to_edge", PROP_BOOLEAN, PROP_NONE);
3858 RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_EDGE_TO_EDGE);
3859 RNA_def_property_ui_text(prop, "Edge-to-Edge", "Drag anchor brush from edge-to-edge");
3860 RNA_def_property_update(prop, 0, "rna_Brush_update");
3861
3862 /* only for projection paint & vertex paint, TODO: other paint modes. */
3863 prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
3866 prop, "Affect Alpha", "When this is disabled, lock alpha while painting");
3867 RNA_def_property_update(prop, 0, "rna_Brush_update");
3868
3869 prop = RNA_def_property(srna, "curve_distance_falloff", PROP_POINTER, PROP_NONE);
3871 RNA_def_property_ui_text(prop, "Falloff Curve", "Editable falloff curve");
3872 RNA_def_property_update(prop, 0, "rna_Brush_update");
3873
3874 prop = RNA_def_property(srna, "paint_curve", PROP_POINTER, PROP_NONE);
3876 RNA_def_property_ui_text(prop, "Paint Curve", "Active paint curve");
3877 RNA_def_property_update(prop, 0, "rna_Brush_update");
3878
3879 prop = RNA_def_property(srna, "gradient", PROP_POINTER, PROP_NEVER_NULL);
3880 RNA_def_property_pointer_sdna(prop, nullptr, "gradient");
3881 RNA_def_property_struct_type(prop, "ColorRamp");
3882 RNA_def_property_ui_text(prop, "Gradient", "");
3883 RNA_def_property_update(prop, 0, "rna_Brush_update");
3884
3885 /* gradient source */
3886 prop = RNA_def_property(srna, "gradient_stroke_mode", PROP_ENUM, PROP_NONE);
3887 RNA_def_property_enum_items(prop, brush_gradient_items);
3888 RNA_def_property_ui_text(prop, "Gradient Stroke Mode", "");
3889 RNA_def_property_update(prop, 0, "rna_Brush_update");
3890
3891 prop = RNA_def_property(srna, "gradient_fill_mode", PROP_ENUM, PROP_NONE);
3892 RNA_def_property_enum_items(prop, brush_gradient_fill_items);
3893 RNA_def_property_ui_text(prop, "Gradient Fill Mode", "");
3894 RNA_def_property_update(prop, 0, "rna_Brush_update");
3895
3896 /* overlay flags */
3897 prop = RNA_def_property(srna, "use_primary_overlay", PROP_BOOLEAN, PROP_NONE);
3898 RNA_def_property_boolean_sdna(prop, nullptr, "overlay_flags", BRUSH_OVERLAY_PRIMARY);
3899 RNA_def_property_ui_text(prop, "Use Texture Overlay", "Show texture in viewport");
3900 RNA_def_property_update(prop, 0, "rna_Brush_update");
3901
3902 prop = RNA_def_property(srna, "use_secondary_overlay", PROP_BOOLEAN, PROP_NONE);
3903 RNA_def_property_boolean_sdna(prop, nullptr, "overlay_flags", BRUSH_OVERLAY_SECONDARY);
3904 RNA_def_property_ui_text(prop, "Use Texture Overlay", "Show texture in viewport");
3905 RNA_def_property_update(prop, 0, "rna_Brush_update");
3906
3907 prop = RNA_def_property(srna, "use_cursor_overlay", PROP_BOOLEAN, PROP_NONE);
3908 RNA_def_property_boolean_sdna(prop, nullptr, "overlay_flags", BRUSH_OVERLAY_CURSOR);
3909 RNA_def_property_ui_text(prop, "Use Cursor Overlay", "Show cursor in viewport");
3910 RNA_def_property_update(prop, 0, "rna_Brush_update");
3911
3912 prop = RNA_def_property(srna, "use_cursor_overlay_override", PROP_BOOLEAN, PROP_NONE);
3914 prop, nullptr, "overlay_flags", BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE);
3915 RNA_def_property_ui_text(prop, "Override Overlay", "Don't show overlay during a stroke");
3916 RNA_def_property_update(prop, 0, "rna_Brush_update");
3917
3918 prop = RNA_def_property(srna, "use_primary_overlay_override", PROP_BOOLEAN, PROP_NONE);
3920 prop, nullptr, "overlay_flags", BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE);
3921 RNA_def_property_ui_text(prop, "Override Overlay", "Don't show overlay during a stroke");
3922 RNA_def_property_update(prop, 0, "rna_Brush_update");
3923
3924 prop = RNA_def_property(srna, "use_secondary_overlay_override", PROP_BOOLEAN, PROP_NONE);
3926 prop, nullptr, "overlay_flags", BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE);
3927 RNA_def_property_ui_text(prop, "Override Overlay", "Don't show overlay during a stroke");
3928 RNA_def_property_update(prop, 0, "rna_Brush_update");
3929
3930 /* paint mode flags */
3931 prop = RNA_def_property(srna, "use_paint_sculpt", PROP_BOOLEAN, PROP_NONE);
3932 RNA_def_property_boolean_sdna(prop, nullptr, "ob_mode", OB_MODE_SCULPT);
3933 RNA_def_property_ui_text(prop, "Use Sculpt", "Use this brush in sculpt mode");
3934 RNA_def_property_update(prop, 0, "rna_Brush_update");
3935
3936 prop = RNA_def_property(srna, "use_paint_uv_sculpt", PROP_BOOLEAN, PROP_NONE);
3937 RNA_def_property_boolean_sdna(prop, nullptr, "ob_mode", OB_MODE_EDIT);
3938 RNA_def_property_ui_text(prop, "Use UV Sculpt", "Use this brush in UV sculpt mode");
3939 RNA_def_property_update(prop, 0, "rna_Brush_update");
3940
3941 prop = RNA_def_property(srna, "use_paint_vertex", PROP_BOOLEAN, PROP_NONE);
3942 RNA_def_property_boolean_sdna(prop, nullptr, "ob_mode", OB_MODE_VERTEX_PAINT);
3943 RNA_def_property_ui_text(prop, "Use Vertex", "Use this brush in vertex paint mode");
3944 RNA_def_property_update(prop, 0, "rna_Brush_update");
3945
3946 prop = RNA_def_property(srna, "use_paint_weight", PROP_BOOLEAN, PROP_NONE);
3947 RNA_def_property_boolean_sdna(prop, nullptr, "ob_mode", OB_MODE_WEIGHT_PAINT);
3948 RNA_def_property_ui_text(prop, "Use Weight", "Use this brush in weight paint mode");
3949 RNA_def_property_update(prop, 0, "rna_Brush_update");
3950
3951 prop = RNA_def_property(srna, "use_paint_image", PROP_BOOLEAN, PROP_NONE);
3952 RNA_def_property_boolean_sdna(prop, nullptr, "ob_mode", OB_MODE_TEXTURE_PAINT);
3953 RNA_def_property_ui_text(prop, "Use Texture", "Use this brush in texture paint mode");
3954 RNA_def_property_update(prop, 0, "rna_Brush_update");
3955
3956 prop = RNA_def_property(srna, "use_paint_grease_pencil", PROP_BOOLEAN, PROP_NONE);
3958 RNA_def_property_ui_text(prop, "Use Paint", "Use this brush in Grease Pencil drawing mode");
3959 RNA_def_property_update(prop, 0, "rna_Brush_update");
3960
3961 prop = RNA_def_property(srna, "use_vertex_grease_pencil", PROP_BOOLEAN, PROP_NONE);
3964 prop, "Use Vertex", "Use this brush in Grease Pencil vertex color mode");
3965 RNA_def_property_update(prop, 0, "rna_Brush_update");
3966
3967 prop = RNA_def_property(srna, "use_paint_sculpt_curves", PROP_BOOLEAN, PROP_NONE);
3968 RNA_def_property_boolean_sdna(prop, nullptr, "ob_mode", OB_MODE_SCULPT_CURVES);
3969 RNA_def_property_ui_text(prop, "Use Sculpt", "Use this brush in sculpt curves mode");
3970 RNA_def_property_update(prop, 0, "rna_Brush_update");
3971
3972 /* texture */
3973 prop = RNA_def_property(srna, "texture_slot", PROP_POINTER, PROP_NONE);
3974 RNA_def_property_struct_type(prop, "BrushTextureSlot");
3975 RNA_def_property_pointer_sdna(prop, nullptr, "mtex");
3977 RNA_def_property_ui_text(prop, "Texture Slot", "");
3978
3979 prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
3980 RNA_def_property_pointer_sdna(prop, nullptr, "mtex.tex");
3982 RNA_def_property_ui_text(prop, "Texture", "");
3983 RNA_def_property_update(prop, NC_TEXTURE, "rna_Brush_main_tex_update");
3984
3985 prop = RNA_def_property(srna, "mask_texture_slot", PROP_POINTER, PROP_NONE);
3986 RNA_def_property_struct_type(prop, "BrushTextureSlot");
3987 RNA_def_property_pointer_sdna(prop, nullptr, "mask_mtex");
3989 RNA_def_property_ui_text(prop, "Mask Texture Slot", "");
3990
3991 prop = RNA_def_property(srna, "mask_texture", PROP_POINTER, PROP_NONE);
3992 RNA_def_property_pointer_sdna(prop, nullptr, "mask_mtex.tex");
3994 RNA_def_property_ui_text(prop, "Mask Texture", "");
3995 RNA_def_property_update(prop, NC_TEXTURE, "rna_Brush_secondary_tex_update");
3996
3997 prop = RNA_def_property(srna, "texture_overlay_alpha", PROP_INT, PROP_PERCENTAGE);
3998 RNA_def_property_int_sdna(prop, nullptr, "texture_overlay_alpha");
3999 RNA_def_property_range(prop, 0, 100);
4000 RNA_def_property_ui_text(prop, "Texture Overlay Alpha", "");
4001 RNA_def_property_update(prop, 0, "rna_Brush_update");
4002
4003 prop = RNA_def_property(srna, "mask_overlay_alpha", PROP_INT, PROP_PERCENTAGE);
4004 RNA_def_property_int_sdna(prop, nullptr, "mask_overlay_alpha");
4005 RNA_def_property_range(prop, 0, 100);
4006 RNA_def_property_ui_text(prop, "Mask Texture Overlay Alpha", "");
4007 RNA_def_property_update(prop, 0, "rna_Brush_update");
4008
4009 prop = RNA_def_property(srna, "cursor_overlay_alpha", PROP_INT, PROP_PERCENTAGE);
4010 RNA_def_property_int_sdna(prop, nullptr, "cursor_overlay_alpha");
4011 RNA_def_property_range(prop, 0, 100);
4012 RNA_def_property_ui_text(prop, "Mask Texture Overlay Alpha", "");
4013 RNA_def_property_update(prop, 0, "rna_Brush_update");
4014
4015 prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR_GAMMA);
4016 RNA_def_property_float_sdna(prop, nullptr, "add_col");
4017 RNA_def_property_array(prop, 4);
4018 RNA_def_property_ui_text(prop, "Add Color", "Color of cursor when adding");
4019 RNA_def_property_update(prop, 0, "rna_Brush_update");
4020
4021 prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR_GAMMA);
4022 RNA_def_property_float_sdna(prop, nullptr, "sub_col");
4023 RNA_def_property_array(prop, 4);
4024 RNA_def_property_ui_text(prop, "Subtract Color", "Color of cursor when subtracting");
4025 RNA_def_property_update(prop, 0, "rna_Brush_update");
4026
4027 prop = RNA_def_property(srna, "brush_capabilities", PROP_POINTER, PROP_NONE);
4029 RNA_def_property_struct_type(prop, "BrushCapabilities");
4030 RNA_def_property_pointer_funcs(prop, "rna_Brush_capabilities_get", nullptr, nullptr, nullptr);
4031 RNA_def_property_ui_text(prop, "Brush Capabilities", "Brush's capabilities");
4032
4033 /* brush capabilities (mode-dependent) */
4034 prop = RNA_def_property(srna, "sculpt_capabilities", PROP_POINTER, PROP_NONE);
4036 RNA_def_property_struct_type(prop, "BrushCapabilitiesSculpt");
4038 prop, "rna_Sculpt_brush_capabilities_get", nullptr, nullptr, nullptr);
4039 RNA_def_property_ui_text(prop, "Sculpt Capabilities", "");
4040
4041 prop = RNA_def_property(srna, "image_paint_capabilities", PROP_POINTER, PROP_NONE);
4043 RNA_def_property_struct_type(prop, "BrushCapabilitiesImagePaint");
4045 prop, "rna_Imapaint_brush_capabilities_get", nullptr, nullptr, nullptr);
4046 RNA_def_property_ui_text(prop, "Image Paint Capabilities", "");
4047
4048 prop = RNA_def_property(srna, "vertex_paint_capabilities", PROP_POINTER, PROP_NONE);
4050 RNA_def_property_struct_type(prop, "BrushCapabilitiesVertexPaint");
4052 prop, "rna_Vertexpaint_brush_capabilities_get", nullptr, nullptr, nullptr);
4053 RNA_def_property_ui_text(prop, "Vertex Paint Capabilities", "");
4054
4055 prop = RNA_def_property(srna, "weight_paint_capabilities", PROP_POINTER, PROP_NONE);
4057 RNA_def_property_struct_type(prop, "BrushCapabilitiesWeightPaint");
4059 prop, "rna_Weightpaint_brush_capabilities_get", nullptr, nullptr, nullptr);
4060 RNA_def_property_ui_text(prop, "Weight Paint Capabilities", "");
4061
4062 prop = RNA_def_property(srna, "gpencil_settings", PROP_POINTER, PROP_NONE);
4063 RNA_def_property_struct_type(prop, "BrushGpencilSettings");
4064 RNA_def_property_pointer_sdna(prop, nullptr, "gpencil_settings");
4066 RNA_def_property_ui_text(prop, "Gpencil Settings", "");
4067
4068 prop = RNA_def_property(srna, "curves_sculpt_settings", PROP_POINTER, PROP_NONE);
4069 RNA_def_property_struct_type(prop, "BrushCurvesSculptSettings");
4071 RNA_def_property_ui_text(prop, "Curves Sculpt Settings", "");
4072
4073 prop = RNA_def_property(srna, "mesh_automasking_settings", PROP_POINTER, PROP_NONE);
4074 RNA_def_property_struct_type(prop, "MeshAutomaskingSettings");
4076 RNA_def_property_ui_text(prop, "Mesh Automasking Settings", nullptr);
4077
4078 prop = RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
4080 prop, nullptr, "unified_paint_flags", BRUSH_USE_UNIFIED_PAINT_SIZE);
4081 RNA_def_property_ui_text(prop, "Use Unified Size", "Use shared size for this brush");
4082 RNA_def_property_update(prop, 0, "rna_Brush_update");
4083
4084 prop = RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
4086 prop, nullptr, "unified_paint_flags", BRUSH_USE_UNIFIED_PAINT_ALPHA);
4087 RNA_def_property_ui_text(prop, "Use Unified Strength", "Use shared strength for this brush");
4088 RNA_def_property_update(prop, 0, "rna_Brush_update");
4089
4090 prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE);
4092 prop, nullptr, "unified_paint_flags", BRUSH_USE_UNIFIED_PAINT_WEIGHT);
4093 RNA_def_property_ui_text(prop, "Use Unified Weight", "Use shared weight for this brush");
4094 RNA_def_property_update(prop, 0, "rna_Brush_update");
4095
4096 prop = RNA_def_property(srna, "use_unified_color", PROP_BOOLEAN, PROP_NONE);
4098 prop, nullptr, "unified_paint_flags", BRUSH_USE_UNIFIED_PAINT_COLOR);
4099 RNA_def_property_ui_text(prop, "Use Unified Color", "Use shared color for this brush");
4100 RNA_def_property_update(prop, 0, "rna_Brush_update");
4101
4102 prop = RNA_def_property(srna, "use_unified_input_samples", PROP_BOOLEAN, PROP_NONE);
4104 prop, nullptr, "unified_paint_flags", BRUSH_USE_UNIFIED_PAINT_INPUT_SAMPLES);
4106 prop, "Use Unified Input Samples", "Use shared input samples for this brush");
4107 RNA_def_property_update(prop, 0, "rna_Brush_update");
4108}
4109
4121{
4122 StructRNA *srna;
4123 PropertyRNA *prop;
4124
4125 srna = RNA_def_struct(brna, "OperatorStrokeElement", "PropertyGroup");
4126 RNA_def_struct_ui_text(srna, "Operator Stroke Element", "");
4127
4128 prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
4130 RNA_def_property_array(prop, 3);
4131 RNA_def_property_ui_text(prop, "Location", "");
4132
4133 prop = RNA_def_property(srna, "mouse", PROP_FLOAT, PROP_XYZ);
4135 RNA_def_property_array(prop, 2);
4136 RNA_def_property_ui_text(prop, "Mouse", "");
4137
4138 prop = RNA_def_property(srna, "mouse_event", PROP_FLOAT, PROP_XYZ);
4140 RNA_def_property_array(prop, 2);
4141 RNA_def_property_ui_text(prop, "Mouse Event", "");
4142
4143 prop = RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_FACTOR);
4145 RNA_def_property_range(prop, 0.0f, 1.0f);
4146 RNA_def_property_ui_text(prop, "Pressure", "Tablet pressure");
4147
4148 prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
4150 RNA_def_property_range(prop, 0.0f, FLT_MAX);
4151 RNA_def_property_ui_text(prop, "Brush Size", "Brush size in screen space");
4152
4153 prop = RNA_def_property(srna, "x_tilt", PROP_FLOAT, PROP_FACTOR);
4155 RNA_def_property_range(prop, -1.0f, 1.0f);
4156 RNA_def_property_ui_text(prop, "Tilt X", "Pen tilt from left (-1.0) to right (+1.0)");
4157
4158 prop = RNA_def_property(srna, "y_tilt", PROP_FLOAT, PROP_FACTOR);
4160 RNA_def_property_range(prop, -1.0f, 1.0f);
4161 RNA_def_property_ui_text(prop, "Tilt Y", "Pen tilt from backward (-1.0) to forward (+1.0)");
4162
4163 /* used in uv painting */
4164 prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
4166 RNA_def_property_ui_text(prop, "Time", "");
4167
4168 /* used for Grease Pencil sketching sessions */
4169 prop = RNA_def_property(srna, "is_start", PROP_BOOLEAN, PROP_NONE);
4171 RNA_def_property_ui_text(prop, "Is Stroke Start", "");
4172
4173 /* XXX: Tool: this will be for pressing a modifier key for a different brush,
4174 * e.g. switching to a Smooth brush in the middle of the stroke */
4175
4176 /* XXX: i don't think blender currently supports the ability to properly do a remappable modifier
4177 * in the middle of a stroke */
4178}
4179
4193
4194} // namespace blender
4195
4196#endif
Low-level operations for grease pencil.
General operations, lookup, etc. for materials.
#define INT32_MAX
#define M_PI_2
#define M_PI
#define BLI_STR_UTF8_DEGREE_SIGN
#define BLT_I18NCONTEXT_AMOUNT
#define CTX_N_(context, msgid)
#define BLT_I18NCONTEXT_ID_BRUSH
#define BLT_I18NCONTEXT_ID_CURVES
#define BLT_I18NCONTEXT_ID_CURVE_LEGACY
#define BLT_I18NCONTEXT_ID_GPENCIL
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define BLT_I18NCONTEXT_ID_MASK
#define BLT_I18NCONTEXT_COLOR
#define MAX_BRUSH_PIXEL_DIAMETER
#define GPENCIL_MIN_FILL_FAC
#define GP_MAX_INPUT_SAMPLES
#define GPENCIL_MAX_FILL_FAC
#define PAINT_MAX_INPUT_SAMPLES
#define RNA_ENUM_ITEM_SEPR
Definition RNA_types.hh:762
#define C
Definition RandGen.cpp:29
#define NC_BRUSH
Definition WM_types.hh:398
#define ND_DATA
Definition WM_types.hh:552
#define ND_SPACE_PROPERTIES
Definition WM_types.hh:572
#define NC_SCENE
Definition WM_types.hh:391
#define ND_TOOLSETTINGS
Definition WM_types.hh:468
#define ND_SPACE_IMAGE
Definition WM_types.hh:565
#define NA_EDITED
Definition WM_types.hh:634
#define NC_GPENCIL
Definition WM_types.hh:412
#define NC_TEXTURE
Definition WM_types.hh:394
#define NC_SPACE
Definition WM_types.hh:405
#define ELEM(...)
#define FLT_MAX
bool supports_sculpt_plane(const Brush &brush)
Definition brush.cc:2014
bool supports_secondary_cursor_color(const Brush &brush)
Definition brush.cc:2028
bool supports_auto_smooth(const Brush &brush)
Definition brush.cc:1943
bool supports_jitter(const Brush &brush)
Definition brush.cc:1975
bool supports_space_attenuation(const Brush &brush)
Definition brush.cc:2052
bool supports_size_pressure(const Brush &brush)
Definition brush.cc:2061
bool supports_persistence(const Brush &brush)
Definition brush.cc:1991
bool supports_tilt(const Brush &brush)
Definition brush.cc:2103
bool supports_inverted_direction(const Brush &brush)
Definition brush.cc:2073
bool supports_hardness(const Brush &brush)
Definition brush.cc:1959
bool supports_auto_smooth_pressure(const Brush &brush)
Definition brush.cc:2065
bool supports_rake_factor(const Brush &brush)
Definition brush.cc:1987
bool supports_plane_depth(const Brush &brush)
Definition brush.cc:1971
bool supports_accumulate(const Brush &brush)
Definition brush.cc:1916
bool supports_gravity(const Brush &brush)
Definition brush.cc:2091
bool supports_hardness_pressure(const Brush &brush)
Definition brush.cc:2069
bool supports_smooth_stroke(const Brush &brush)
Definition brush.cc:2043
bool supports_plane_offset(const Brush &brush)
Definition brush.cc:2002
bool supports_pinch_factor(const Brush &brush)
Definition brush.cc:1995
bool supports_normal_radius(const Brush &brush)
Definition brush.cc:1949
bool supports_color(const Brush &brush)
Definition brush.cc:2024
bool supports_random_texture_angle(const Brush &brush)
Definition brush.cc:2010
bool supports_strength_pressure(const Brush &brush)
Definition brush.cc:2057
bool supports_dyntopo(const Brush &brush)
Definition brush.cc:1893
bool supports_height(const Brush &brush)
Definition brush.cc:1963
bool supports_topology_rake(const Brush &brush)
Definition brush.cc:1932
bool supports_plane_height(const Brush &brush)
Definition brush.cc:1967
bool supports_normal_weight(const Brush &brush)
Definition brush.cc:1980
bool supports_tip_roundness(const Brush &brush)
Definition brush.cc:1955
void invalidate_overlay_all(Scene &scene)
void invalidate_overlay_tex(Scene &scene, const Tex *tex)
BMesh Iterators.
static const EnumPropertyItem prop_direction_items[]
void WM_main_add_notifier(uint type, void *reference)
@ BRUSH_CURVE_INVSQUARE
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
@ BRUSH_BOUNDARY_DEFORM_GRAB
@ BRUSH_BOUNDARY_DEFORM_SMOOTH
@ BRUSH_BOUNDARY_DEFORM_TWIST
@ BRUSH_BOUNDARY_DEFORM_EXPAND
@ BRUSH_BOUNDARY_DEFORM_BEND
@ BRUSH_BOUNDARY_DEFORM_INFLATE
@ BRUSH_GRADIENT_RADIAL
@ BRUSH_GRADIENT_LINEAR
void RNA_def_brush(BlenderRNA *brna)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_deprecated(PropertyRNA *prop, const char *note, const short version, const short removal_version)
const EnumPropertyItem rna_enum_shared_automasking_flag_items[]
Definition rna_brush.cc:95
const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[]
Definition rna_brush.cc:302
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
static void rna_def_gpencil_options(BlenderRNA *brna)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
@ GP_BRUSH_MODE_VERTEXCOLOR
@ GP_BRUSH_MODE_MATERIAL
@ GPWEIGHT_BRUSH_TYPE_SMEAR
@ GPWEIGHT_BRUSH_TYPE_DRAW
@ GPWEIGHT_BRUSH_TYPE_BLUR
@ GPWEIGHT_BRUSH_TYPE_AVERAGE
@ BRUSH_STROKE_DRAG_DOT
@ BRUSH_STROKE_ANCHORED
@ BRUSH_STROKE_AIRBRUSH
static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[]
Definition rna_brush.cc:344
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
static void rna_def_image_paint_capabilities(BlenderRNA *brna)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
@ BRUSH_GRADIENT_SPACING_CLAMP
@ BRUSH_GRADIENT_SPACING_REPEAT
@ BRUSH_GRADIENT_PRESSURE
@ BRUSH_SNAKE_HOOK_DEFORM_ELASTIC
@ BRUSH_SNAKE_HOOK_DEFORM_FALLOFF
@ BRUSH_SLIDE_DEFORM_EXPAND
@ BRUSH_SLIDE_DEFORM_DRAG
@ BRUSH_SLIDE_DEFORM_PINCH
Material * BKE_object_material_get(Object *ob, short act)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
@ BRUSH_COLOR_JITTER_USE_SAT_RAND_PRESS
@ BRUSH_COLOR_JITTER_USE_HUE_AT_STROKE
@ BRUSH_COLOR_JITTER_USE_VAL_AT_STROKE
@ BRUSH_COLOR_JITTER_USE_HUE_RAND_PRESS
@ BRUSH_COLOR_JITTER_USE_SAT_AT_STROKE
@ BRUSH_COLOR_JITTER_USE_VAL_RAND_PRESS
@ PAINT_FALLOFF_SHAPE_TUBE
@ GP_FILL_DMODE_CONTROL
@ IMB_BLEND_COLOR
Definition IMB_imbuf.hh:227
@ IMB_BLEND_HARDLIGHT
Definition IMB_imbuf.hh:213
@ IMB_BLEND_COLORBURN
Definition IMB_imbuf.hh:214
@ IMB_BLEND_SOFTLIGHT
Definition IMB_imbuf.hh:218
@ IMB_BLEND_SCREEN
Definition IMB_imbuf.hh:217
@ IMB_BLEND_VIVIDLIGHT
Definition IMB_imbuf.hh:220
@ IMB_BLEND_DARKEN
Definition IMB_imbuf.hh:209
@ IMB_BLEND_ADD_ALPHA
Definition IMB_imbuf.hh:211
@ IMB_BLEND_PINLIGHT
Definition IMB_imbuf.hh:219
@ IMB_BLEND_MUL
Definition IMB_imbuf.hh:207
@ IMB_BLEND_LINEARBURN
Definition IMB_imbuf.hh:215
@ IMB_BLEND_COLORDODGE
Definition IMB_imbuf.hh:216
@ IMB_BLEND_DIFFERENCE
Definition IMB_imbuf.hh:222
@ IMB_BLEND_HUE
Definition IMB_imbuf.hh:224
@ IMB_BLEND_SUB
Definition IMB_imbuf.hh:206
@ IMB_BLEND_OVERLAY
Definition IMB_imbuf.hh:212
@ IMB_BLEND_LINEARLIGHT
Definition IMB_imbuf.hh:221
@ IMB_BLEND_SATURATION
Definition IMB_imbuf.hh:225
@ IMB_BLEND_EXCLUSION
Definition IMB_imbuf.hh:223
@ IMB_BLEND_MIX
Definition IMB_imbuf.hh:204
@ IMB_BLEND_ERASE_ALPHA
Definition IMB_imbuf.hh:210
@ IMB_BLEND_LIGHTEN
Definition IMB_imbuf.hh:208
@ IMB_BLEND_LUMINOSITY
Definition IMB_imbuf.hh:226
@ IMB_BLEND_ADD
Definition IMB_imbuf.hh:205
const EnumPropertyItem rna_enum_curves_type_items[]
Definition rna_curves.cc:26
@ WPAINT_BRUSH_TYPE_AVERAGE
@ WPAINT_BRUSH_TYPE_SMEAR
@ WPAINT_BRUSH_TYPE_DRAW
@ WPAINT_BRUSH_TYPE_BLUR
const EnumPropertyItem rna_enum_brush_gpencil_types_items[]
Definition rna_brush.cc:221
static void rna_def_sculpt_capabilities(BlenderRNA *brna)
ColorBand * BKE_colorband_add(bool rangetype)
Definition colorband.cc:301
@ BRUSH_PLANE_INVERT_DISPLACEMENT
@ BRUSH_PLANE_SWAP_HEIGHT_AND_DEPTH
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
@ BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW
@ BRUSH_GRAB_SILHOUETTE
@ BRUSH_POSE_IK_ANCHORED
@ BRUSH_MULTIPLANE_SCRAPE_DYNAMIC
@ BRUSH_USE_COLOR_AS_DISPLACEMENT
@ BRUSH_PROJECT_USE_BIDIRECTIONAL
@ BRUSH_USE_CONNECTED_ONLY
@ BRUSH_CLOTH_USE_COLLISION
@ BRUSH_POSE_USE_LOCK_ROTATION
@ BRUSH_AREA_RADIUS_PRESSURE
@ BRUSH_CLOTH_PIN_SIMULATION_BOUNDARY
@ BRUSH_SMOOTH_DEFORM_LAPLACIAN
@ BRUSH_SMOOTH_DEFORM_SURFACE
static EnumPropertyItem rna_enum_gpencil_fill_extend_modes_items[]
Definition rna_brush.cc:354
void BKE_brush_scale_size(int *r_brush_size, float new_unprojected_size, float old_unprojected_size)
Definition brush.cc:1429
@ GP_FILL_SOLVER_DELAUNAY
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
@ BRUSH_BOUNDARY_FALLOFF_LOOP
@ BRUSH_BOUNDARY_FALLOFF_CONSTANT
@ BRUSH_BOUNDARY_FALLOFF_RADIUS
@ BRUSH_BOUNDARY_FALLOFF_LOOP_INVERT
static void rna_def_brush_texture_slot(BlenderRNA *brna)
@ BRUSH_CLOTH_DEFORM_PUSH
@ BRUSH_CLOTH_DEFORM_EXPAND
@ BRUSH_CLOTH_DEFORM_INFLATE
@ BRUSH_CLOTH_DEFORM_SNAKE_HOOK
@ BRUSH_CLOTH_DEFORM_DRAG
@ BRUSH_CLOTH_DEFORM_GRAB
@ BRUSH_CLOTH_DEFORM_PINCH_POINT
@ BRUSH_CLOTH_DEFORM_PINCH_PERPENDICULAR
static EnumPropertyItem rna_enum_gpencil_fill_solver_items[]
Definition rna_brush.cc:374
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
ViewLayer * CTX_data_view_layer(const bContext *C)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
@ BRUSH_CURVES_SCULPT_FLAG_SCALE_UNIFORM
@ BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_RADIUS
@ BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH
@ BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_POINT_COUNT
@ BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ SCULPT_BRUSH_TYPE_INFLATE
@ SCULPT_BRUSH_TYPE_SMEAR
@ SCULPT_BRUSH_TYPE_CLOTH
@ SCULPT_BRUSH_TYPE_SIMPLIFY
@ SCULPT_BRUSH_TYPE_SMOOTH
@ SCULPT_BRUSH_TYPE_CLAY_STRIPS
@ SCULPT_BRUSH_TYPE_CREASE
@ SCULPT_BRUSH_TYPE_DRAW_FACE_SETS
@ SCULPT_BRUSH_TYPE_GRAB
@ SCULPT_BRUSH_TYPE_BLUR
@ SCULPT_BRUSH_TYPE_PAINT
@ SCULPT_BRUSH_TYPE_BLOB
@ SCULPT_BRUSH_TYPE_PLANE
@ SCULPT_BRUSH_TYPE_SLIDE_RELAX
@ SCULPT_BRUSH_TYPE_PINCH
@ SCULPT_BRUSH_TYPE_POSE
@ SCULPT_BRUSH_TYPE_ROTATE
@ SCULPT_BRUSH_TYPE_LAYER
@ SCULPT_BRUSH_TYPE_DISPLACEMENT_ERASER
@ SCULPT_BRUSH_TYPE_BOUNDARY
@ SCULPT_BRUSH_TYPE_MASK
@ SCULPT_BRUSH_TYPE_DISPLACEMENT_SMEAR
@ SCULPT_BRUSH_TYPE_DRAW_SHARP
@ SCULPT_BRUSH_TYPE_SNAKE_HOOK
@ SCULPT_BRUSH_TYPE_CLAY
@ SCULPT_BRUSH_TYPE_CLAY_THUMB
@ SCULPT_BRUSH_TYPE_MULTIPLANE_SCRAPE
@ SCULPT_BRUSH_TYPE_SCENE_PROJECT
@ SCULPT_BRUSH_TYPE_THUMB
@ SCULPT_BRUSH_TYPE_NUDGE
@ SCULPT_BRUSH_TYPE_ELASTIC_DEFORM
@ SCULPT_BRUSH_TYPE_DRAW
@ BRUSH_MASK_PRESSURE_CUTOFF
@ BRUSH_MASK_PRESSURE_RAMP
@ GPSCULPT_BRUSH_TYPE_CLONE
@ GPSCULPT_BRUSH_TYPE_PINCH
@ GPSCULPT_BRUSH_TYPE_PUSH
@ GPSCULPT_BRUSH_TYPE_THICKNESS
@ GPSCULPT_BRUSH_TYPE_RANDOMIZE
@ GPSCULPT_BRUSH_TYPE_GRAB
@ GPSCULPT_BRUSH_TYPE_STRENGTH
@ GPSCULPT_BRUSH_TYPE_SMOOTH
@ GPSCULPT_BRUSH_TYPE_TWIST
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void BKE_brush_tag_unsaved_changes(Brush *brush)
Definition brush.cc:843
@ BRUSH_POSE_DEFORM_SQUASH_STRETCH
@ BRUSH_POSE_DEFORM_SCALE_TRANSLATE
@ BRUSH_POSE_DEFORM_ROTATE_TWIST
@ BRUSH_POSE_ORIGIN_TOPOLOGY
@ BRUSH_POSE_ORIGIN_FACE_SETS_FK
@ BRUSH_POSE_ORIGIN_FACE_SETS
@ BRUSH_ELASTIC_DEFORM_TWIST
@ BRUSH_ELASTIC_DEFORM_GRAB_BISCALE
@ BRUSH_ELASTIC_DEFORM_GRAB
@ BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE
@ BRUSH_ELASTIC_DEFORM_SCALE
const EnumPropertyItem rna_enum_brush_image_brush_type_items[]
Definition rna_brush.cc:211
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
static void rna_def_brush(BlenderRNA *brna)
static const EnumPropertyItem rna_enum_brush_texture_slot_map_all_mode_items[]
Definition rna_brush.cc:69
@ GP_FILL_GPLMODE_ACTIVE
@ GP_FILL_GPLMODE_BELOW
@ GP_FILL_GPLMODE_VISIBLE
@ GP_FILL_GPLMODE_ALL_ABOVE
@ GP_FILL_GPLMODE_ABOVE
@ GP_FILL_GPLMODE_ALL_BELOW
const EnumPropertyItem rna_enum_brush_gpencil_vertex_types_items[]
Definition rna_brush.cc:241
@ GPAINT_BRUSH_TYPE_ERASE
@ GPAINT_BRUSH_TYPE_FILL
@ GPAINT_BRUSH_TYPE_TINT
@ GPAINT_BRUSH_TYPE_DRAW
@ GP_BRUSH_ERASER_STROKE
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
@ BRUSH_PAINT_WET_MIX_PRESSURE_INVERT
@ BRUSH_PAINT_WET_PERSISTENCE_PRESSURE
@ BRUSH_PAINT_FLOW_PRESSURE_INVERT
@ BRUSH_PAINT_DENSITY_PRESSURE
@ BRUSH_PAINT_WET_MIX_PRESSURE
@ BRUSH_PAINT_DENSITY_PRESSURE_INVERT
@ BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT
@ BRUSH_PAINT_FLOW_PRESSURE
@ PROP_BOOLEAN
Definition RNA_types.hh:210
@ PROP_POINTER
Definition RNA_types.hh:215
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
@ BRUSH_PAINT_ANTIALIASING
@ OB_MODE_VERTEX_GREASE_PENCIL
@ OB_MODE_TEXTURE_PAINT
@ OB_MODE_SCULPT_CURVES
@ OB_MODE_PAINT_GREASE_PENCIL
void BKE_grease_pencil_brush_material_set(struct Brush *brush, struct Material *material)
static void rna_def_weight_paint_capabilities(BlenderRNA *brna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
static EnumPropertyItem rna_enum_gpencil_fill_direction_items[]
Definition rna_brush.cc:368
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
const EnumPropertyItem rna_enum_brush_sculpt_brush_type_items[]
Definition rna_brush.cc:148
@ IMAGE_PAINT_BRUSH_TYPE_SOFTEN
@ IMAGE_PAINT_BRUSH_TYPE_SMEAR
@ IMAGE_PAINT_BRUSH_TYPE_DRAW
@ IMAGE_PAINT_BRUSH_TYPE_FILL
@ IMAGE_PAINT_BRUSH_TYPE_MASK
@ IMAGE_PAINT_BRUSH_TYPE_CLONE
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
const EnumPropertyItem rna_enum_brush_vertex_brush_type_items[]
Definition rna_brush.cc:195
@ CURVES_SCULPT_BRUSH_TYPE_COMB
@ CURVES_SCULPT_BRUSH_TYPE_SMOOTH
@ CURVES_SCULPT_BRUSH_TYPE_ADD
@ CURVES_SCULPT_BRUSH_TYPE_SLIDE
@ CURVES_SCULPT_BRUSH_TYPE_DENSITY
@ CURVES_SCULPT_BRUSH_TYPE_PINCH
@ CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK
@ CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK
@ CURVES_SCULPT_BRUSH_TYPE_DELETE
@ CURVES_SCULPT_BRUSH_TYPE_CUT
@ CURVES_SCULPT_BRUSH_TYPE_PUFF
@ CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT
ToolSettings * CTX_data_tool_settings(const bContext *C)
const EnumPropertyItem rna_enum_dummy_DEFAULT_items[]
Definition rna_rna.cc:34
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void BKE_brush_color_sync_legacy(Brush *brush)
Definition brush.cc:1319
static EnumPropertyItem rna_enum_gpencil_brush_modes_items[]
Definition rna_brush.cc:379
static void rna_def_brush_capabilities(BlenderRNA *brna)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void BKE_brush_scale_unprojected_size(float *unprojected_size, int new_brush_size, int old_brush_size)
Definition brush.cc:1417
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
@ BRUSH_AUTOMASKING_VIEW_OCCLUSION
@ BRUSH_AUTOMASKING_TOPOLOGY
@ BRUSH_AUTOMASKING_BRUSH_NORMAL
@ BRUSH_AUTOMASKING_FACE_SETS
@ BRUSH_AUTOMASKING_CAVITY_USE_CURVE
@ BRUSH_AUTOMASKING_BOUNDARY_FACE_SETS
@ BRUSH_AUTOMASKING_BOUNDARY_EDGES
@ BRUSH_AUTOMASKING_VIEW_NORMAL
@ BRUSH_AUTOMASKING_CAVITY_NORMAL
@ BRUSH_AUTOMASKING_CAVITY_INVERTED
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
@ GPVERTEX_BRUSH_TYPE_REPLACE
@ GPVERTEX_BRUSH_TYPE_BLUR
@ GPVERTEX_BRUSH_TYPE_AVERAGE
@ GPVERTEX_BRUSH_TYPE_SMEAR
@ GPVERTEX_BRUSH_TYPE_DRAW
@ BRUSH_USE_UNIFIED_PAINT_INPUT_SAMPLES
@ BRUSH_USE_UNIFIED_PAINT_WEIGHT
@ BRUSH_USE_UNIFIED_PAINT_SIZE
@ BRUSH_USE_UNIFIED_PAINT_ALPHA
@ BRUSH_USE_UNIFIED_PAINT_COLOR
const EnumPropertyItem rna_enum_brush_weight_brush_type_items[]
Definition rna_brush.cc:203
static EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items[]
Definition rna_brush.cc:359
Main * CTX_data_main(const bContext *C)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
@ PROP_CONTEXT_UPDATE
Definition RNA_types.hh:477
@ PROP_EDITABLE
Definition RNA_types.hh:376
@ PROP_IDPROPERTY
Definition RNA_types.hh:496
@ PROP_ID_SELF_CHECK
Definition RNA_types.hh:440
@ PROP_NEVER_NULL
Definition RNA_types.hh:447
@ PROP_ANIMATABLE
Definition RNA_types.hh:389
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ BRUSH_DEFORM_TARGET_CLOTH_SIM
@ BRUSH_DEFORM_TARGET_GEOMETRY
static void rna_def_vertex_paint_capabilities(BlenderRNA *brna)
@ BRUSH_PROJECT_RAY_DIRECTION_PLANE_NORMAL
@ BRUSH_PROJECT_RAY_DIRECTION_VIEW_NORMAL
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
static const EnumPropertyItem sculpt_stroke_method_items[]
Definition rna_brush.cc:38
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
@ BRUSH_SPACING_PRESSURE
@ BRUSH_ORIGINAL_NORMAL
@ BRUSH_GRAB_ACTIVE_VERTEX
@ BRUSH_JITTER_PRESSURE
@ BRUSH_ABSOLUTE_JITTER
@ BRUSH_HARDNESS_PRESSURE
@ BRUSH_OFFSET_PRESSURE
@ BRUSH_SMOOTH_PRESSURE
@ BRUSH_INVERT_TO_SCRAPE_FILL
Scene * CTX_data_scene(const bContext *C)
const EnumPropertyItem rna_enum_brush_curve_preset_items[]
Definition rna_brush.cc:79
@ BRUSH_SMEAR_DEFORM_EXPAND
@ BRUSH_SMEAR_DEFORM_DRAG
@ BRUSH_SMEAR_DEFORM_PINCH
static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[]
Definition rna_brush.cc:333
@ PROP_PERCENTAGE
Definition RNA_types.hh:307
@ PROP_FACTOR
Definition RNA_types.hh:308
@ PROP_DISTANCE_DIAMETER
Definition RNA_types.hh:351
@ PROP_DISTANCE
Definition RNA_types.hh:313
@ PROP_PIXEL_DIAMETER
Definition RNA_types.hh:350
@ PROP_COLOR_GAMMA
Definition RNA_types.hh:329
@ PROP_UNSIGNED
Definition RNA_types.hh:306
@ GP_BRUSH_USE_PRESS_AT_STROKE
@ GP_BRUSH_USE_UV_AT_STROKE
@ GP_BRUSH_USE_STRENGTH_RAND_PRESS
@ GP_BRUSH_USE_STROKE
@ GP_BRUSH_USE_UV_RAND_PRESS
@ GP_BRUSH_USE_PRESSURE_RAND_PRESS
@ GP_BRUSH_USE_STRENGTH_AT_STROKE
@ BRUSH_OVERLAY_SECONDARY
@ BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE
@ BRUSH_OVERLAY_PRIMARY
@ BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE
@ BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE
@ GP_BRUSH_FILL_FIT_DISABLE
@ GP_BRUSH_FILL_SHOW_EXTENDLINES
@ GP_BRUSH_OUTLINE_STROKE
@ GP_BRUSH_ERASER_KEEP_CAPS
@ GP_BRUSH_ACTIVE_LAYER_ONLY
@ GP_BRUSH_GROUP_RANDOM
@ GP_BRUSH_FILL_SHOW_HELPLINES
@ GP_BRUSH_OCCLUDE_ERASER
@ GP_BRUSH_FILL_STROKE_COLLIDE
@ GP_BRUSH_USE_STRENGTH_PRESSURE
@ GP_BRUSH_TRIM_STROKE
@ GP_BRUSH_DISSABLE_LASSO
@ GP_BRUSH_FILL_AUTO_REMOVE_FILL_GUIDES
@ GP_BRUSH_FILL_INTERNAL_GAPS
@ GP_BRUSH_STABILIZE_MOUSE
@ GP_BRUSH_USE_PRESSURE
@ GP_BRUSH_GROUP_SETTINGS
@ GP_BRUSH_USE_CYCLIC_STROKE
@ GP_BRUSH_USE_JITTER_PRESSURE
@ GP_BRUSH_MATERIAL_PINNED
void RNA_def_property_int_default(PropertyRNA *prop, int value)
void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
static void rna_def_operator_stroke_element(BlenderRNA *brna)
void RNA_def_property_array(PropertyRNA *prop, int length)
PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
@ BRUSH_CLOTH_SIMULATION_AREA_GLOBAL
@ BRUSH_CLOTH_SIMULATION_AREA_LOCAL
@ BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
const EnumPropertyItem rna_enum_brush_gpencil_sculpt_types_items[]
Definition rna_brush.cc:266
@ BRUSH_CURVES_SCULPT_DENSITY_MODE_ADD
@ BRUSH_CURVES_SCULPT_DENSITY_MODE_AUTO
@ BRUSH_CURVES_SCULPT_DENSITY_MODE_REMOVE
@ BRUSH_CLOTH_FORCE_FALLOFF_PLANE
@ BRUSH_CLOTH_FORCE_FALLOFF_RADIAL
@ GP_SCULPT_FLAGMODE_APPLY_POSITION
@ GP_SCULPT_FLAGMODE_APPLY_UV
@ GP_SCULPT_FLAGMODE_APPLY_THICKNESS
@ GP_SCULPT_FLAGMODE_APPLY_STRENGTH
static void rna_def_curves_sculpt_options(BlenderRNA *brna)
@ VPAINT_BRUSH_TYPE_DRAW
@ VPAINT_BRUSH_TYPE_SMEAR
@ VPAINT_BRUSH_TYPE_AVERAGE
@ VPAINT_BRUSH_TYPE_BLUR
const EnumPropertyItem rna_enum_brush_curves_sculpt_brush_type_items[]
Definition rna_brush.cc:314
#define TEXTURE_CAPABILITY(prop_name_, ui_name_)
#define IMAPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_)
#define SCULPT_BRUSH_CAPABILITY(prop_name_, ui_name_)
#define VPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_)
#define BRUSH_CAPABILITY(prop_name_, ui_name_)
#define WPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_)
eBrushImagePaintType image_brush_type
eMTex_BrushMapMode brush_map_mode
#define N_(msgid)