Blender V4.3
rna_brush.cc File Reference
#include <cstdlib>
#include "DNA_brush_types.h"
#include "DNA_gpencil_legacy_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "DNA_workspace_types.h"
#include "BKE_layer.hh"
#include "BLI_math_base.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "rna_internal.hh"
#include "IMB_imbuf.hh"
#include "WM_types.hh"

Go to the source code of this file.

Macros

#define TEXTURE_CAPABILITY(prop_name_, ui_name_)
 
#define SCULPT_BRUSH_CAPABILITY(prop_name_, ui_name_)
 
#define BRUSH_CAPABILITY(prop_name_, ui_name_)
 
#define IMAPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_)
 
#define VPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_)
 
#define WPAINT_BRUSH_CAPABILITY(prop_name_, ui_name_)
 

Functions

static void rna_def_brush_texture_slot (BlenderRNA *brna)
 
static void rna_def_sculpt_capabilities (BlenderRNA *brna)
 
static void rna_def_brush_capabilities (BlenderRNA *brna)
 
static void rna_def_image_paint_capabilities (BlenderRNA *brna)
 
static void rna_def_vertex_paint_capabilities (BlenderRNA *brna)
 
static void rna_def_weight_paint_capabilities (BlenderRNA *brna)
 
static void rna_def_gpencil_options (BlenderRNA *brna)
 
static void rna_def_curves_sculpt_options (BlenderRNA *brna)
 
static void rna_def_brush (BlenderRNA *brna)
 
static void rna_def_operator_stroke_element (BlenderRNA *brna)
 
void RNA_def_brush (BlenderRNA *brna)
 

Variables

static const EnumPropertyItem prop_direction_items []
 
static const EnumPropertyItem sculpt_stroke_method_items []
 
static const EnumPropertyItem rna_enum_brush_texture_slot_map_all_mode_items []
 
const EnumPropertyItem rna_enum_brush_curve_preset_items []
 
const EnumPropertyItem rna_enum_brush_automasking_flag_items []
 
const EnumPropertyItem rna_enum_brush_sculpt_brush_type_items []
 
const EnumPropertyItem rna_enum_brush_vertex_brush_type_items []
 
const EnumPropertyItem rna_enum_brush_weight_brush_type_items []
 
const EnumPropertyItem rna_enum_brush_image_brush_type_items []
 
const EnumPropertyItem rna_enum_brush_gpencil_types_items []
 
const EnumPropertyItem rna_enum_brush_gpencil_vertex_types_items []
 
const EnumPropertyItem rna_enum_brush_gpencil_sculpt_types_items []
 
const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items []
 
const EnumPropertyItem rna_enum_brush_curves_sculpt_brush_type_items []
 
static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items []
 
static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items []
 
static EnumPropertyItem rna_enum_gpencil_fill_extend_modes_items []
 
static EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items []
 
static EnumPropertyItem rna_enum_gpencil_fill_direction_items []
 
static EnumPropertyItem rna_enum_gpencil_brush_modes_items []
 

Macro Definition Documentation

◆ BRUSH_CAPABILITY

#define BRUSH_CAPABILITY ( prop_name_,
ui_name_ )
Value:
prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
RNA_def_property_boolean_funcs(prop, "rna_BrushCapabilities_" #prop_name_ "_get", nullptr); \
RNA_def_property_ui_text(prop, ui_name_, nullptr)
@ PROP_BOOLEAN
Definition RNA_types.hh:65
@ PROP_EDITABLE
Definition RNA_types.hh:207
@ PROP_NONE
Definition RNA_types.hh:136
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)

Referenced by rna_def_brush_capabilities().

◆ IMAPAINT_BRUSH_CAPABILITY

#define IMAPAINT_BRUSH_CAPABILITY ( prop_name_,
ui_name_ )
Value:
prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
RNA_def_property_boolean_funcs( \
prop, "rna_BrushCapabilitiesImagePaint_" #prop_name_ "_get", nullptr); \
RNA_def_property_ui_text(prop, ui_name_, nullptr)

Referenced by rna_def_image_paint_capabilities().

◆ SCULPT_BRUSH_CAPABILITY

#define SCULPT_BRUSH_CAPABILITY ( prop_name_,
ui_name_ )
Value:
prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
RNA_def_property_boolean_funcs( \
prop, "rna_BrushCapabilitiesSculpt_" #prop_name_ "_get", nullptr); \
RNA_def_property_ui_text(prop, ui_name_, nullptr)

Referenced by rna_def_sculpt_capabilities().

◆ TEXTURE_CAPABILITY

#define TEXTURE_CAPABILITY ( prop_name_,
ui_name_ )
Value:
prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
RNA_def_property_boolean_funcs(prop, "rna_TextureCapabilities_" #prop_name_ "_get", nullptr); \
RNA_def_property_ui_text(prop, ui_name_, nullptr)

Referenced by rna_def_brush_texture_slot().

◆ VPAINT_BRUSH_CAPABILITY

#define VPAINT_BRUSH_CAPABILITY ( prop_name_,
ui_name_ )
Value:
prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
RNA_def_property_boolean_funcs( \
prop, "rna_BrushCapabilitiesVertexPaint_" #prop_name_ "_get", nullptr); \
RNA_def_property_ui_text(prop, ui_name_, nullptr)

Referenced by rna_def_vertex_paint_capabilities().

◆ WPAINT_BRUSH_CAPABILITY

#define WPAINT_BRUSH_CAPABILITY ( prop_name_,
ui_name_ )
Value:
prop = RNA_def_property(srna, #prop_name_, PROP_BOOLEAN, PROP_NONE); \
RNA_def_property_clear_flag(prop, PROP_EDITABLE); \
RNA_def_property_boolean_funcs( \
prop, "rna_BrushCapabilitiesWeightPaint_" #prop_name_ "_get", nullptr); \
RNA_def_property_ui_text(prop, ui_name_, nullptr)

Referenced by rna_def_weight_paint_capabilities().

Function Documentation

◆ RNA_def_brush()

◆ rna_def_brush()

static void rna_def_brush ( BlenderRNA * brna)
static

Begin per-mode brush type properties.

keep in sync with #BKE_paint_get_tool_prop_id_from_paintmode

End per mode brush type properties.

Definition at line 2194 of file rna_brush.cc.

References AUTOMASKING_BOUNDARY_EDGES_MAX_PROPAGATION_STEPS, BLT_I18NCONTEXT_ID_BRUSH, BLT_I18NCONTEXT_ID_CURVES, BLT_I18NCONTEXT_ID_GPENCIL, BLT_I18NCONTEXT_ID_MASK, BRUSH_ABSOLUTE_JITTER, BRUSH_ACCUMULATE, BRUSH_ADAPTIVE_SPACE, BRUSH_AIRBRUSH, BRUSH_ALPHA_PRESSURE, BRUSH_ANCHORED, BRUSH_AREA_RADIUS_PRESSURE, BRUSH_AUTOMASKING_BRUSH_NORMAL, BRUSH_AUTOMASKING_CAVITY_INVERTED, BRUSH_AUTOMASKING_CAVITY_NORMAL, BRUSH_AUTOMASKING_VIEW_NORMAL, BRUSH_AUTOMASKING_VIEW_OCCLUSION, BRUSH_BOUNDARY_DEFORM_BEND, BRUSH_BOUNDARY_DEFORM_EXPAND, BRUSH_BOUNDARY_DEFORM_GRAB, BRUSH_BOUNDARY_DEFORM_INFLATE, BRUSH_BOUNDARY_DEFORM_SMOOTH, BRUSH_BOUNDARY_DEFORM_TWIST, BRUSH_BOUNDARY_FALLOFF_CONSTANT, BRUSH_BOUNDARY_FALLOFF_LOOP, BRUSH_BOUNDARY_FALLOFF_LOOP_INVERT, BRUSH_BOUNDARY_FALLOFF_RADIUS, BRUSH_CLOTH_DEFORM_DRAG, BRUSH_CLOTH_DEFORM_EXPAND, BRUSH_CLOTH_DEFORM_GRAB, BRUSH_CLOTH_DEFORM_INFLATE, BRUSH_CLOTH_DEFORM_PINCH_PERPENDICULAR, BRUSH_CLOTH_DEFORM_PINCH_POINT, BRUSH_CLOTH_DEFORM_PUSH, BRUSH_CLOTH_DEFORM_SNAKE_HOOK, BRUSH_CLOTH_FORCE_FALLOFF_PLANE, BRUSH_CLOTH_FORCE_FALLOFF_RADIAL, BRUSH_CLOTH_PIN_SIMULATION_BOUNDARY, BRUSH_CLOTH_SIMULATION_AREA_DYNAMIC, BRUSH_CLOTH_SIMULATION_AREA_GLOBAL, BRUSH_CLOTH_SIMULATION_AREA_LOCAL, BRUSH_CLOTH_USE_COLLISION, BRUSH_CURVE, BRUSH_CUSTOM_ICON, BRUSH_DEFORM_TARGET_CLOTH_SIM, BRUSH_DEFORM_TARGET_GEOMETRY, BRUSH_DRAG_DOT, BRUSH_EDGE_TO_EDGE, BRUSH_ELASTIC_DEFORM_GRAB, BRUSH_ELASTIC_DEFORM_GRAB_BISCALE, BRUSH_ELASTIC_DEFORM_GRAB_TRISCALE, BRUSH_ELASTIC_DEFORM_SCALE, BRUSH_ELASTIC_DEFORM_TWIST, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, BRUSH_GRAB_ACTIVE_VERTEX, BRUSH_GRAB_SILHOUETTE, BRUSH_GRADIENT_LINEAR, BRUSH_GRADIENT_PRESSURE, BRUSH_GRADIENT_RADIAL, BRUSH_GRADIENT_SPACING_CLAMP, BRUSH_GRADIENT_SPACING_REPEAT, BRUSH_INVERSE_SMOOTH_PRESSURE, BRUSH_INVERT_TO_SCRAPE_FILL, BRUSH_JITTER_PRESSURE, BRUSH_LINE, BRUSH_LOCK_ALPHA, BRUSH_LOCK_SIZE, BRUSH_MASK_DRAW, BRUSH_MASK_PRESSURE_CUTOFF, BRUSH_MASK_PRESSURE_RAMP, BRUSH_MASK_SMOOTH, BRUSH_MULTIPLANE_SCRAPE_DYNAMIC, BRUSH_MULTIPLANE_SCRAPE_PLANES_PREVIEW, BRUSH_OFFSET_PRESSURE, BRUSH_ORIGINAL_NORMAL, BRUSH_ORIGINAL_PLANE, BRUSH_OVERLAY_CURSOR, BRUSH_OVERLAY_CURSOR_OVERRIDE_ON_STROKE, BRUSH_OVERLAY_PRIMARY, BRUSH_OVERLAY_PRIMARY_OVERRIDE_ON_STROKE, BRUSH_OVERLAY_SECONDARY, BRUSH_OVERLAY_SECONDARY_OVERRIDE_ON_STROKE, BRUSH_PAINT_ANTIALIASING, BRUSH_PAINT_DENSITY_PRESSURE, BRUSH_PAINT_DENSITY_PRESSURE_INVERT, BRUSH_PAINT_FLOW_PRESSURE, BRUSH_PAINT_FLOW_PRESSURE_INVERT, BRUSH_PAINT_HARDNESS_PRESSURE, BRUSH_PAINT_HARDNESS_PRESSURE_INVERT, BRUSH_PAINT_WET_MIX_PRESSURE, BRUSH_PAINT_WET_MIX_PRESSURE_INVERT, BRUSH_PAINT_WET_PERSISTENCE_PRESSURE, BRUSH_PAINT_WET_PERSISTENCE_PRESSURE_INVERT, BRUSH_PERSISTENT, BRUSH_PLANE_TRIM, BRUSH_POSE_DEFORM_ROTATE_TWIST, BRUSH_POSE_DEFORM_SCALE_TRASLATE, BRUSH_POSE_DEFORM_SQUASH_STRETCH, BRUSH_POSE_IK_ANCHORED, BRUSH_POSE_ORIGIN_FACE_SETS, BRUSH_POSE_ORIGIN_FACE_SETS_FK, BRUSH_POSE_ORIGIN_TOPOLOGY, BRUSH_POSE_USE_LOCK_ROTATION, BRUSH_SCENE_SPACING, BRUSH_SIZE_PRESSURE, BRUSH_SLIDE_DEFORM_DRAG, BRUSH_SLIDE_DEFORM_EXPAND, BRUSH_SLIDE_DEFORM_PINCH, BRUSH_SMEAR_DEFORM_DRAG, BRUSH_SMEAR_DEFORM_EXPAND, BRUSH_SMEAR_DEFORM_PINCH, BRUSH_SMOOTH_DEFORM_LAPLACIAN, BRUSH_SMOOTH_DEFORM_SURFACE, BRUSH_SMOOTH_STROKE, BRUSH_SNAKE_HOOK_DEFORM_ELASTIC, BRUSH_SNAKE_HOOK_DEFORM_FALLOFF, BRUSH_SPACE, BRUSH_SPACE_ATTEN, BRUSH_SPACING_PRESSURE, BRUSH_USE_COLOR_AS_DISPLACEMENT, BRUSH_USE_CONNECTED_ONLY, BRUSH_USE_GRADIENT, EnumPropertyItem::description, FLT_MAX, EnumPropertyItem::identifier, IMB_BLEND_ADD, IMB_BLEND_ADD_ALPHA, IMB_BLEND_COLOR, IMB_BLEND_COLORBURN, IMB_BLEND_COLORDODGE, IMB_BLEND_DARKEN, IMB_BLEND_DIFFERENCE, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_EXCLUSION, IMB_BLEND_HARDLIGHT, IMB_BLEND_HUE, IMB_BLEND_LIGHTEN, IMB_BLEND_LINEARBURN, IMB_BLEND_LINEARLIGHT, IMB_BLEND_LUMINOSITY, IMB_BLEND_MIX, IMB_BLEND_MUL, IMB_BLEND_OVERLAY, IMB_BLEND_PINLIGHT, IMB_BLEND_SATURATION, IMB_BLEND_SCREEN, IMB_BLEND_SOFTLIGHT, IMB_BLEND_SUB, IMB_BLEND_VIVIDLIGHT, KERNEL_BOX, KERNEL_GAUSSIAN, M_PI, M_PI_2, MAX_BRUSH_PIXEL_RADIUS, EnumPropertyItem::name, NC_SPACE, NC_TEXTURE, ND_SPACE_IMAGE, OB_MODE_EDIT, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, PAINT_FALLOFF_SHAPE_TUBE, PAINT_MAX_INPUT_SAMPLES, PROP_ANGLE, PROP_ANIMATABLE, PROP_BOOLEAN, PROP_COLOR_GAMMA, PROP_CONTEXT_UPDATE, prop_direction_items, PROP_DISTANCE, PROP_EDITABLE, PROP_ENUM, PROP_FACTOR, PROP_FILEPATH, PROP_FLOAT, PROP_INT, PROP_NEVER_NULL, PROP_NONE, PROP_PERCENTAGE, PROP_PIXEL, PROP_POINTER, PROP_STRING, PROP_UNSIGNED, PROP_XYZ, PROPOVERRIDE_OVERRIDABLE_LIBRARY, RNA_def_property(), RNA_def_property_array(), RNA_def_property_boolean_funcs(), RNA_def_property_boolean_negative_sdna(), RNA_def_property_boolean_sdna(), RNA_def_property_clear_flag(), RNA_def_property_enum_bitflag_sdna(), RNA_def_property_enum_funcs(), RNA_def_property_enum_items(), RNA_def_property_enum_sdna(), RNA_def_property_flag(), RNA_def_property_float_default(), RNA_def_property_float_funcs(), RNA_def_property_float_sdna(), RNA_def_property_int_default(), RNA_def_property_int_funcs(), RNA_def_property_int_sdna(), RNA_def_property_override_flag(), RNA_def_property_pointer_funcs(), RNA_def_property_pointer_sdna(), RNA_def_property_range(), RNA_def_property_string_sdna(), RNA_def_property_struct_type(), RNA_def_property_translation_context(), RNA_def_property_ui_icon(), RNA_def_property_ui_range(), RNA_def_property_ui_text(), RNA_def_property_update(), RNA_def_struct(), RNA_def_struct_ui_icon(), RNA_def_struct_ui_text(), rna_enum_brush_automasking_flag_items, rna_enum_brush_curve_preset_items, rna_enum_brush_curves_sculpt_brush_type_items, rna_enum_brush_gpencil_sculpt_types_items, rna_enum_brush_gpencil_types_items, rna_enum_brush_gpencil_vertex_types_items, rna_enum_brush_gpencil_weight_types_items, rna_enum_brush_image_brush_type_items, rna_enum_brush_sculpt_brush_type_items, rna_enum_brush_vertex_brush_type_items, rna_enum_brush_weight_brush_type_items, RNA_ENUM_ITEM_SEPR, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, sculpt_stroke_method_items, and EnumPropertyItem::value.

Referenced by RNA_def_brush().

◆ rna_def_brush_capabilities()

static void rna_def_brush_capabilities ( BlenderRNA * brna)
static

◆ rna_def_brush_texture_slot()

◆ rna_def_curves_sculpt_options()

◆ rna_def_gpencil_options()

static void rna_def_gpencil_options ( BlenderRNA * brna)
static

Definition at line 1372 of file rna_brush.cc.

References BLI_STR_UTF8_DEGREE_SIGN, BLT_I18NCONTEXT_AMOUNT, BLT_I18NCONTEXT_ID_BRUSH, BLT_I18NCONTEXT_ID_GPENCIL, GP_BRUSH_ACTIVE_LAYER_ONLY, GP_BRUSH_DISSABLE_LASSO, GP_BRUSH_ERASER_KEEP_CAPS, GP_BRUSH_FILL_FIT_DISABLE, GP_BRUSH_FILL_HIDE, GP_BRUSH_FILL_SHOW_EXTENDLINES, GP_BRUSH_FILL_SHOW_HELPLINES, GP_BRUSH_FILL_STROKE_COLLIDE, GP_BRUSH_GROUP_RANDOM, GP_BRUSH_GROUP_SETTINGS, GP_BRUSH_MATERIAL_PINNED, GP_BRUSH_OCCLUDE_ERASER, GP_BRUSH_OUTLINE_STROKE, GP_BRUSH_STABILIZE_MOUSE, GP_BRUSH_TRIM_STROKE, GP_BRUSH_USE_HUE_AT_STROKE, GP_BRUSH_USE_HUE_RAND_PRESS, GP_BRUSH_USE_JITTER_PRESSURE, GP_BRUSH_USE_PRESS_AT_STROKE, GP_BRUSH_USE_PRESSURE, GP_BRUSH_USE_PRESSURE_RAND_PRESS, GP_BRUSH_USE_SAT_AT_STROKE, GP_BRUSH_USE_SAT_RAND_PRESS, GP_BRUSH_USE_STRENGTH_AT_STROKE, GP_BRUSH_USE_STRENGTH_PRESSURE, GP_BRUSH_USE_STRENGTH_RAND_PRESS, GP_BRUSH_USE_UV_AT_STROKE, GP_BRUSH_USE_UV_RAND_PRESS, GP_BRUSH_USE_VAL_AT_STROKE, GP_BRUSH_USE_VAL_RAND_PRESS, GP_MAX_INPUT_SAMPLES, GP_SCULPT_FLAGMODE_APPLY_POSITION, GP_SCULPT_FLAGMODE_APPLY_STRENGTH, GP_SCULPT_FLAGMODE_APPLY_THICKNESS, GP_SCULPT_FLAGMODE_APPLY_UV, GP_STROKE_CAP_FLAT, GP_STROKE_CAP_ROUND, GPENCIL_MAX_FILL_FAC, GPENCIL_MIN_FILL_FAC, GPPAINT_MODE_BOTH, GPPAINT_MODE_FILL, GPPAINT_MODE_STROKE, M_PI_2, NC_GPENCIL, NC_SCENE, ND_DATA, ND_TOOLSETTINGS, PROP_ANGLE, PROP_ANIMATABLE, PROP_BOOLEAN, PROP_CONTEXT_UPDATE, PROP_EDITABLE, PROP_ENUM, PROP_FACTOR, PROP_FLOAT, PROP_ID_SELF_CHECK, PROP_INT, PROP_NONE, PROP_PERCENTAGE, PROP_PIXEL, PROP_POINTER, PROP_XYZ, RNA_def_parameter_clear_flags(), RNA_def_property(), RNA_def_property_array(), RNA_def_property_boolean_default(), RNA_def_property_boolean_funcs(), RNA_def_property_boolean_negative_sdna(), RNA_def_property_boolean_sdna(), RNA_def_property_clear_flag(), RNA_def_property_enum_bitflag_sdna(), RNA_def_property_enum_items(), RNA_def_property_enum_sdna(), RNA_def_property_flag(), RNA_def_property_float_default(), RNA_def_property_float_sdna(), RNA_def_property_int_default(), RNA_def_property_int_sdna(), RNA_def_property_pointer_funcs(), RNA_def_property_pointer_sdna(), RNA_def_property_range(), RNA_def_property_struct_type(), RNA_def_property_translation_context(), RNA_def_property_ui_icon(), RNA_def_property_ui_range(), RNA_def_property_ui_text(), RNA_def_property_update(), RNA_def_struct(), RNA_def_struct_path_func(), RNA_def_struct_sdna(), RNA_def_struct_ui_text(), rna_enum_gpencil_brush_eraser_modes_items, rna_enum_gpencil_brush_modes_items, rna_enum_gpencil_fill_direction_items, rna_enum_gpencil_fill_draw_modes_items, rna_enum_gpencil_fill_extend_modes_items, and rna_enum_gpencil_fill_layers_modes_items.

Referenced by RNA_def_brush().

◆ rna_def_image_paint_capabilities()

static void rna_def_image_paint_capabilities ( BlenderRNA * brna)
static

◆ rna_def_operator_stroke_element()

static void rna_def_operator_stroke_element ( BlenderRNA * brna)
static

A brush stroke is a list of changes to the brush that can occur during a stroke

  • 3D location of the brush
  • 2D mouse location
  • Tablet pressure
  • Direction flip
  • Brush type switch
  • Time

Definition at line 3901 of file rna_brush.cc.

References FLT_MAX, PROP_BOOLEAN, PROP_FACTOR, PROP_FLOAT, PROP_IDPROPERTY, PROP_NONE, PROP_UNSIGNED, PROP_XYZ, RNA_def_property(), RNA_def_property_array(), RNA_def_property_flag(), RNA_def_property_range(), RNA_def_property_ui_text(), RNA_def_struct(), and RNA_def_struct_ui_text().

Referenced by RNA_def_brush().

◆ rna_def_sculpt_capabilities()

static void rna_def_sculpt_capabilities ( BlenderRNA * brna)
static

◆ rna_def_vertex_paint_capabilities()

static void rna_def_vertex_paint_capabilities ( BlenderRNA * brna)
static

◆ rna_def_weight_paint_capabilities()

static void rna_def_weight_paint_capabilities ( BlenderRNA * brna)
static

Variable Documentation

◆ prop_direction_items

const EnumPropertyItem prop_direction_items[]
static
Initial value:
= {
{0, "ADD", ICON_ADD, "Add", "Add effect of brush"},
{BRUSH_DIR_IN, "SUBTRACT", ICON_REMOVE, "Subtract", "Subtract effect of brush"},
{0, nullptr, 0, nullptr, nullptr},
}
@ BRUSH_DIR_IN

Definition at line 35 of file rna_brush.cc.

Referenced by rna_def_brush().

◆ rna_enum_brush_automasking_flag_items

const EnumPropertyItem rna_enum_brush_automasking_flag_items[]

Definition at line 113 of file rna_brush.cc.

Referenced by rna_def_brush(), and rna_def_sculpt().

◆ rna_enum_brush_curve_preset_items

const EnumPropertyItem rna_enum_brush_curve_preset_items[]
Initial value:
= {
{BRUSH_CURVE_CUSTOM, "CUSTOM", ICON_RNDCURVE, "Custom", ""},
{BRUSH_CURVE_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
{BRUSH_CURVE_SMOOTHER, "SMOOTHER", ICON_SMOOTHCURVE, "Smoother", ""},
{BRUSH_CURVE_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", ""},
{BRUSH_CURVE_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
{BRUSH_CURVE_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
{BRUSH_CURVE_LIN, "LIN", ICON_LINCURVE, "Linear", ""},
{BRUSH_CURVE_POW4, "POW4", ICON_SHARPCURVE, "Sharper", ""},
{BRUSH_CURVE_INVSQUARE, "INVSQUARE", ICON_INVERSESQUARECURVE, "Inverse Square", ""},
{BRUSH_CURVE_CONSTANT, "CONSTANT", ICON_NOCURVE, "Constant", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ BRUSH_CURVE_CUSTOM
@ BRUSH_CURVE_SHARP
@ BRUSH_CURVE_INVSQUARE
@ BRUSH_CURVE_SPHERE
@ BRUSH_CURVE_CONSTANT
@ BRUSH_CURVE_POW4
@ BRUSH_CURVE_ROOT
@ BRUSH_CURVE_SMOOTH
@ BRUSH_CURVE_SMOOTHER
@ BRUSH_CURVE_LIN

Definition at line 97 of file rna_brush.cc.

Referenced by rna_def_brush(), and rna_def_uv_sculpt().

◆ rna_enum_brush_curves_sculpt_brush_type_items

const EnumPropertyItem rna_enum_brush_curves_sculpt_brush_type_items[]
Initial value:
= {
{CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT, "SELECTION_PAINT", 0, "Paint Selection", ""},
{CURVES_SCULPT_BRUSH_TYPE_ADD, "ADD", 0, "Add", ""},
{CURVES_SCULPT_BRUSH_TYPE_DELETE, "DELETE", 0, "Delete", ""},
{CURVES_SCULPT_BRUSH_TYPE_DENSITY, "DENSITY", 0, "Density", ""},
{CURVES_SCULPT_BRUSH_TYPE_COMB, "COMB", 0, "Comb", ""},
{CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""},
{CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK, "GROW_SHRINK", 0, "Grow / Shrink", ""},
{CURVES_SCULPT_BRUSH_TYPE_PINCH, "PINCH", 0, "Pinch", ""},
{CURVES_SCULPT_BRUSH_TYPE_PUFF, "PUFF", 0, "Puff", ""},
{CURVES_SCULPT_BRUSH_TYPE_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{CURVES_SCULPT_BRUSH_TYPE_SLIDE, "SLIDE", 0, "Slide", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ CURVES_SCULPT_BRUSH_TYPE_SMOOTH
@ CURVES_SCULPT_BRUSH_TYPE_PUFF
@ CURVES_SCULPT_BRUSH_TYPE_GROW_SHRINK
@ CURVES_SCULPT_BRUSH_TYPE_PINCH
@ CURVES_SCULPT_BRUSH_TYPE_SNAKE_HOOK
@ CURVES_SCULPT_BRUSH_TYPE_ADD
@ CURVES_SCULPT_BRUSH_TYPE_COMB
@ CURVES_SCULPT_BRUSH_TYPE_DENSITY
@ CURVES_SCULPT_BRUSH_TYPE_DELETE
@ CURVES_SCULPT_BRUSH_TYPE_SLIDE
@ CURVES_SCULPT_BRUSH_TYPE_SELECTION_PAINT
#define RNA_ENUM_ITEM_SEPR
Definition RNA_types.hh:528

Definition at line 317 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_gpencil_sculpt_types_items

const EnumPropertyItem rna_enum_brush_gpencil_sculpt_types_items[]

Definition at line 269 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_gpencil_types_items

const EnumPropertyItem rna_enum_brush_gpencil_types_items[]
Initial value:
= {
"DRAW",
ICON_STROKE,
"Draw",
"The brush is of type used for drawing strokes"},
"FILL",
ICON_COLOR,
"Fill",
"The brush is of type used for filling areas"},
"ERASE",
ICON_PANEL_CLOSE,
"Erase",
"The brush is used for erasing strokes"},
{GPAINT_BRUSH_TYPE_TINT, "TINT", 0, "Tint", "The brush is of type used for tinting strokes"},
{0, nullptr, 0, nullptr, nullptr},
}
@ GPAINT_BRUSH_TYPE_TINT
@ GPAINT_BRUSH_TYPE_FILL
@ GPAINT_BRUSH_TYPE_DRAW
@ GPAINT_BRUSH_TYPE_ERASE

Definition at line 224 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_gpencil_vertex_types_items

const EnumPropertyItem rna_enum_brush_gpencil_vertex_types_items[]
Initial value:
= {
{GPVERTEX_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", "Paint a color on stroke points"},
"BLUR",
0,
"Blur",
"Smooth out the colors of adjacent stroke points"},
"AVERAGE",
0,
"Average",
"Smooth out colors with the average color under the brush"},
"SMEAR",
0,
"Smear",
"Smudge colors by grabbing and dragging them"},
"REPLACE",
0,
"Replace",
"Replace the color of stroke points that already have a color applied"},
{0, nullptr, 0, nullptr, nullptr},
}
@ GPVERTEX_BRUSH_TYPE_BLUR
@ GPVERTEX_BRUSH_TYPE_DRAW
@ GPVERTEX_BRUSH_TYPE_REPLACE
@ GPVERTEX_BRUSH_TYPE_AVERAGE
@ GPVERTEX_BRUSH_TYPE_SMEAR

Definition at line 244 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_gpencil_weight_types_items

const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[]
Initial value:
= {
{GPWEIGHT_BRUSH_TYPE_DRAW, "WEIGHT", 0, "Weight", "Paint weight in active vertex group"},
{GPWEIGHT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", "Blur weight in active vertex group"},
"AVERAGE",
0,
"Average",
"Average weight in active vertex group"},
{GPWEIGHT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", "Smear weight in active vertex group"},
{0, nullptr, 0, nullptr, nullptr},
}
@ GPWEIGHT_BRUSH_TYPE_AVERAGE
@ GPWEIGHT_BRUSH_TYPE_DRAW
@ GPWEIGHT_BRUSH_TYPE_SMEAR
@ GPWEIGHT_BRUSH_TYPE_BLUR

Definition at line 305 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_image_brush_type_items

const EnumPropertyItem rna_enum_brush_image_brush_type_items[]
Initial value:
= {
{IMAGE_PAINT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
{IMAGE_PAINT_BRUSH_TYPE_SOFTEN, "SOFTEN", 0, "Soften", ""},
{IMAGE_PAINT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
{IMAGE_PAINT_BRUSH_TYPE_CLONE, "CLONE", 0, "Clone", ""},
{IMAGE_PAINT_BRUSH_TYPE_FILL, "FILL", 0, "Fill", ""},
{IMAGE_PAINT_BRUSH_TYPE_MASK, "MASK", 0, "Mask", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ IMAGE_PAINT_BRUSH_TYPE_MASK
@ IMAGE_PAINT_BRUSH_TYPE_FILL
@ IMAGE_PAINT_BRUSH_TYPE_DRAW
@ IMAGE_PAINT_BRUSH_TYPE_CLONE
@ IMAGE_PAINT_BRUSH_TYPE_SOFTEN
@ IMAGE_PAINT_BRUSH_TYPE_SMEAR

Definition at line 214 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_sculpt_brush_type_items

const EnumPropertyItem rna_enum_brush_sculpt_brush_type_items[]

Definition at line 151 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_texture_slot_map_all_mode_items

const EnumPropertyItem rna_enum_brush_texture_slot_map_all_mode_items[]
static
Initial value:
= {
{MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
{MTEX_MAP_MODE_AREA, "AREA_PLANE", 0, "Area Plane", ""},
{MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
{MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
{MTEX_MAP_MODE_RANDOM, "RANDOM", 0, "Random", ""},
{MTEX_MAP_MODE_STENCIL, "STENCIL", 0, "Stencil", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ MTEX_MAP_MODE_AREA
@ MTEX_MAP_MODE_3D
@ MTEX_MAP_MODE_STENCIL
@ MTEX_MAP_MODE_TILED
@ MTEX_MAP_MODE_RANDOM
@ MTEX_MAP_MODE_VIEW

Definition at line 76 of file rna_brush.cc.

Referenced by rna_def_brush_texture_slot().

◆ rna_enum_brush_vertex_brush_type_items

const EnumPropertyItem rna_enum_brush_vertex_brush_type_items[]
Initial value:
= {
{VPAINT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
{VPAINT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", ""},
{VPAINT_BRUSH_TYPE_AVERAGE, "AVERAGE", 0, "Average", ""},
{VPAINT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ VPAINT_BRUSH_TYPE_AVERAGE
@ VPAINT_BRUSH_TYPE_DRAW
@ VPAINT_BRUSH_TYPE_SMEAR
@ VPAINT_BRUSH_TYPE_BLUR

Definition at line 198 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_brush_weight_brush_type_items

const EnumPropertyItem rna_enum_brush_weight_brush_type_items[]
Initial value:
= {
{WPAINT_BRUSH_TYPE_DRAW, "DRAW", 0, "Draw", ""},
{WPAINT_BRUSH_TYPE_BLUR, "BLUR", 0, "Blur", ""},
{WPAINT_BRUSH_TYPE_AVERAGE, "AVERAGE", 0, "Average", ""},
{WPAINT_BRUSH_TYPE_SMEAR, "SMEAR", 0, "Smear", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ WPAINT_BRUSH_TYPE_BLUR
@ WPAINT_BRUSH_TYPE_AVERAGE
@ WPAINT_BRUSH_TYPE_DRAW
@ WPAINT_BRUSH_TYPE_SMEAR

Definition at line 206 of file rna_brush.cc.

Referenced by BKE_paint_get_tool_enum_from_paintmode(), and rna_def_brush().

◆ rna_enum_gpencil_brush_eraser_modes_items

EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[]
static
Initial value:
= {
"SOFT",
0,
"Dissolve",
"Erase strokes, fading their points strength and thickness"},
{GP_BRUSH_ERASER_HARD, "HARD", 0, "Point", "Erase stroke points"},
{GP_BRUSH_ERASER_STROKE, "STROKE", 0, "Stroke", "Erase entire strokes"},
{0, nullptr, 0, nullptr, nullptr},
}
@ GP_BRUSH_ERASER_SOFT
@ GP_BRUSH_ERASER_STROKE
@ GP_BRUSH_ERASER_HARD

Definition at line 335 of file rna_brush.cc.

Referenced by rna_def_gpencil_options().

◆ rna_enum_gpencil_brush_modes_items

EnumPropertyItem rna_enum_gpencil_brush_modes_items[]
static
Initial value:
= {
{GP_BRUSH_MODE_ACTIVE, "ACTIVE", 0, "Active", "Use current mode"},
{GP_BRUSH_MODE_MATERIAL, "MATERIAL", 0, "Material", "Use always material mode"},
{GP_BRUSH_MODE_VERTEXCOLOR, "VERTEXCOLOR", 0, "Vertex Color", "Use always Vertex Color mode"},
{0, nullptr, 0, nullptr, nullptr}}
@ GP_BRUSH_MODE_VERTEXCOLOR
@ GP_BRUSH_MODE_MATERIAL
@ GP_BRUSH_MODE_ACTIVE

Definition at line 376 of file rna_brush.cc.

Referenced by rna_def_gpencil_options().

◆ rna_enum_gpencil_fill_direction_items

EnumPropertyItem rna_enum_gpencil_fill_direction_items[]
static
Initial value:
= {
{0, "NORMAL", ICON_ADD, "Normal", "Fill internal area"},
{BRUSH_DIR_IN, "INVERT", ICON_REMOVE, "Inverted", "Fill inverted area"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 370 of file rna_brush.cc.

Referenced by rna_def_gpencil_options().

◆ rna_enum_gpencil_fill_draw_modes_items

EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[]
static
Initial value:
= {
"BOTH",
0,
"All",
"Use both visible strokes and edit lines as fill boundary limits"},
{GP_FILL_DMODE_STROKE, "STROKE", 0, "Strokes", "Use visible strokes as fill boundary limits"},
{GP_FILL_DMODE_CONTROL, "CONTROL", 0, "Edit Lines", "Use edit lines as fill boundary limits"},
{0, nullptr, 0, nullptr, nullptr}}
@ GP_FILL_DMODE_STROKE
@ GP_FILL_DMODE_CONTROL
@ GP_FILL_DMODE_BOTH

Definition at line 346 of file rna_brush.cc.

Referenced by rna_def_gpencil_options().

◆ rna_enum_gpencil_fill_extend_modes_items

EnumPropertyItem rna_enum_gpencil_fill_extend_modes_items[]
static
Initial value:
= {
{GP_FILL_EMODE_EXTEND, "EXTEND", 0, "Extend", "Extend strokes in straight lines"},
{GP_FILL_EMODE_RADIUS, "RADIUS", 0, "Radius", "Connect endpoints that are close together"},
{0, nullptr, 0, nullptr, nullptr}}
@ GP_FILL_EMODE_RADIUS
@ GP_FILL_EMODE_EXTEND

Definition at line 356 of file rna_brush.cc.

Referenced by rna_def_gpencil_options().

◆ rna_enum_gpencil_fill_layers_modes_items

EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items[]
static
Initial value:
= {
{GP_FILL_GPLMODE_VISIBLE, "VISIBLE", 0, "Visible", "Visible layers"},
{GP_FILL_GPLMODE_ACTIVE, "ACTIVE", 0, "Active", "Only active layer"},
{GP_FILL_GPLMODE_ABOVE, "ABOVE", 0, "Layer Above", "Layer above active"},
{GP_FILL_GPLMODE_BELOW, "BELOW", 0, "Layer Below", "Layer below active"},
{GP_FILL_GPLMODE_ALL_ABOVE, "ALL_ABOVE", 0, "All Above", "All layers above active"},
{GP_FILL_GPLMODE_ALL_BELOW, "ALL_BELOW", 0, "All Below", "All layers below active"},
{0, nullptr, 0, nullptr, nullptr}}
@ GP_FILL_GPLMODE_ABOVE
@ GP_FILL_GPLMODE_ALL_ABOVE
@ GP_FILL_GPLMODE_VISIBLE
@ GP_FILL_GPLMODE_ALL_BELOW
@ GP_FILL_GPLMODE_BELOW
@ GP_FILL_GPLMODE_ACTIVE

Definition at line 361 of file rna_brush.cc.

Referenced by rna_def_gpencil_options().

◆ sculpt_stroke_method_items

const EnumPropertyItem sculpt_stroke_method_items[]
static
Initial value:
= {
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
{BRUSH_DRAG_DOT, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
"SPACE",
0,
"Space",
"Limit brush application to the distance specified by spacing"},
"AIRBRUSH",
0,
"Airbrush",
"Keep applying paint effect while holding mouse (spray)"},
{BRUSH_ANCHORED, "ANCHORED", 0, "Anchored", "Keep the brush anchored to the initial location"},
{BRUSH_LINE, "LINE", 0, "Line", "Draw a line with dabs separated according to spacing"},
"CURVE",
0,
"Curve",
"Define the stroke curve with a Bézier curve (dabs are separated according to spacing)"},
{0, nullptr, 0, nullptr, nullptr},
}
@ BRUSH_DRAG_DOT
@ BRUSH_LINE
@ BRUSH_CURVE
@ BRUSH_ANCHORED
@ BRUSH_AIRBRUSH
@ BRUSH_SPACE
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int

Definition at line 53 of file rna_brush.cc.

Referenced by rna_def_brush().