Blender V4.5
brush.cc File Reference
#include <array>
#include <optional>
#include "MEM_guardedalloc.h"
#include "DNA_ID.h"
#include "DNA_brush_types.h"
#include "DNA_defaults.h"
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.h"
#include "BLI_math_base.hh"
#include "BLI_rand.h"
#include "BLT_translation.hh"
#include "BKE_asset.hh"
#include "BKE_bpath.hh"
#include "BKE_brush.hh"
#include "BKE_colortools.hh"
#include "BKE_gpencil_legacy.h"
#include "BKE_grease_pencil.hh"
#include "BKE_idprop.hh"
#include "BKE_idtype.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_lib_remap.hh"
#include "BKE_main.hh"
#include "BKE_material.hh"
#include "BKE_paint.hh"
#include "BKE_preview_image.hh"
#include "BKE_texture.h"
#include "IMB_colormanagement.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "RE_texture.h"
#include "BLO_read_write.hh"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::bke
namespace  blender::bke::brush

Macros

#define DNA_DEPRECATED_ALLOW
#define FROM_DEFAULT(member)
#define FROM_DEFAULT_PTR(member)
#define BR_TEST(field, t)
#define BR_TEST_FLAG(_f)
#define BR_TEST_FLAG_OVERLAY(_f)

Functions

static void brush_init_data (ID *id)
static void brush_copy_data (Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag)
static void brush_free_data (ID *id)
static void brush_make_local (Main *bmain, ID *id, const int flags)
static void brush_foreach_id (ID *id, LibraryForeachIDData *data)
static void brush_foreach_path (ID *id, BPathForeachPathData *bpath_data)
static void brush_blend_write (BlendWriter *writer, ID *id, const void *id_address)
static void brush_blend_read_data (BlendDataReader *reader, ID *id)
static void brush_blend_read_after_liblink (BlendLibReader *, ID *id)
static void brush_asset_metadata_ensure (void *asset_ptr, AssetMetaData *asset_data)
void BKE_brush_system_init ()
void BKE_brush_system_exit ()
static void brush_defaults (Brush *brush)
BrushBKE_brush_add (Main *bmain, const char *name, const eObjectMode ob_mode)
void BKE_brush_init_gpencil_settings (Brush *brush)
bool BKE_brush_delete (Main *bmain, Brush *brush)
BrushBKE_brush_duplicate (Main *bmain, Brush *brush, eDupli_ID_Flags, uint duplicate_options)
void BKE_brush_init_curves_sculpt_settings (Brush *brush)
void BKE_brush_tag_unsaved_changes (Brush *brush)
BrushBKE_brush_first_search (Main *bmain, const eObjectMode ob_mode)
void BKE_brush_debug_print_state (Brush *br)
void BKE_brush_curve_preset (Brush *b, eCurveMappingPreset preset)
const MTexBKE_brush_mask_texture_get (const Brush *brush, const eObjectMode object_mode)
const MTexBKE_brush_color_texture_get (const Brush *brush, const eObjectMode object_mode)
float BKE_brush_sample_tex_3d (const Scene *scene, const Brush *br, const MTex *mtex, const float point[3], float rgba[4], const int thread, ImagePool *pool)
float BKE_brush_sample_masktex (const Scene *scene, Brush *br, const float point[2], const int thread, ImagePool *pool)
const float * BKE_brush_color_get (const Scene *scene, const Paint *paint, const Brush *brush)
const std::optional< BrushColorJitterSettingsBKE_brush_color_jitter_get_settings (const Scene *scene, const Paint *paint, const Brush *brush)
const float * BKE_brush_secondary_color_get (const Scene *scene, const Paint *paint, const Brush *brush)
void BKE_brush_color_set (Scene *scene, const Paint *paint, Brush *brush, const float color[3])
void BKE_brush_size_set (Scene *scene, Brush *brush, int size)
int BKE_brush_size_get (const Scene *scene, const Brush *brush)
bool BKE_brush_use_locked_size (const Scene *scene, const Brush *brush)
bool BKE_brush_use_size_pressure (const Brush *brush)
bool BKE_brush_use_alpha_pressure (const Brush *brush)
void BKE_brush_unprojected_radius_set (Scene *scene, Brush *brush, float unprojected_radius)
float BKE_brush_unprojected_radius_get (const Scene *scene, const Brush *brush)
void BKE_brush_alpha_set (Scene *scene, Brush *brush, float alpha)
float BKE_brush_alpha_get (const Scene *scene, const Brush *brush)
float BKE_brush_weight_get (const Scene *scene, const Brush *brush)
void BKE_brush_weight_set (const Scene *scene, Brush *brush, float value)
int BKE_brush_input_samples_get (const Scene *scene, const Brush *brush)
void BKE_brush_input_samples_set (const Scene *scene, Brush *brush, int value)
void BKE_brush_scale_unprojected_radius (float *unprojected_radius, int new_brush_size, int old_brush_size)
void BKE_brush_scale_size (int *r_brush_size, float new_unprojected_radius, float old_unprojected_radius)
void BKE_brush_jitter_pos (const Scene &scene, const Brush &brush, const float pos[2], float jitterpos[2])
void BKE_brush_randomize_texture_coords (UnifiedPaintSettings *ups, bool mask)
void BKE_brush_calc_curve_factors (const eBrushCurvePreset preset, const CurveMapping *cumap, const blender::Span< float > distances, const float brush_radius, const blender::MutableSpan< float > factors)
float BKE_brush_curve_strength (const eBrushCurvePreset preset, const CurveMapping *cumap, const float distance, const float brush_radius)
float BKE_brush_curve_strength (const Brush *br, float p, const float len)
float BKE_brush_curve_strength_clamped (const Brush *br, float p, const float len)
static bool brush_gen_texture (const Brush *br, const int side, const bool use_secondary, float *rect)
ImBufBKE_brush_gen_radial_control_imbuf (Brush *br, bool secondary, bool display_gradient)
bool BKE_brush_has_cube_tip (const Brush *brush, PaintMode paint_mode)
bool blender::bke::brush::supports_dyntopo (const Brush &brush)
bool blender::bke::brush::supports_accumulate (const Brush &brush)
bool blender::bke::brush::supports_topology_rake (const Brush &brush)
bool blender::bke::brush::supports_auto_smooth (const Brush &brush)
bool blender::bke::brush::supports_height (const Brush &brush)
bool blender::bke::brush::supports_plane_height (const Brush &brush)
bool blender::bke::brush::supports_plane_depth (const Brush &brush)
bool blender::bke::brush::supports_jitter (const Brush &brush)
bool blender::bke::brush::supports_normal_weight (const Brush &brush)
bool blender::bke::brush::supports_rake_factor (const Brush &brush)
bool blender::bke::brush::supports_persistence (const Brush &brush)
bool blender::bke::brush::supports_pinch_factor (const Brush &brush)
bool blender::bke::brush::supports_plane_offset (const Brush &brush)
bool blender::bke::brush::supports_random_texture_angle (const Brush &brush)
bool blender::bke::brush::supports_sculpt_plane (const Brush &brush)
bool blender::bke::brush::supports_color (const Brush &brush)
bool blender::bke::brush::supports_secondary_cursor_color (const Brush &brush)
bool blender::bke::brush::supports_smooth_stroke (const Brush &brush)
bool blender::bke::brush::supports_space_attenuation (const Brush &brush)
bool blender::bke::brush::supports_strength_pressure (const Brush &brush)
bool blender::bke::brush::supports_inverted_direction (const Brush &brush)
bool blender::bke::brush::supports_gravity (const Brush &brush)
bool blender::bke::brush::supports_tilt (const Brush &brush)

Variables

static AssetTypeInfo AssetType_BR
IDTypeInfo IDType_ID_BR
static RNGbrush_rng

Macro Definition Documentation

◆ BR_TEST

#define BR_TEST ( field,
t )
Value:
if (br->field != def.field) { \
printf("br->" #field " = %" #t ";\n", br->field); \
} \
((void)0)

Referenced by BKE_brush_debug_print_state().

◆ BR_TEST_FLAG

#define BR_TEST_FLAG ( _f)
Value:
if ((br->flag & _f) && !(def.flag & _f)) { \
printf("br->flag |= " #_f ";\n"); \
} \
else if (!(br->flag & _f) && (def.flag & _f)) { \
printf("br->flag &= ~" #_f ";\n"); \
} \
((void)0)

Referenced by BKE_brush_debug_print_state().

◆ BR_TEST_FLAG_OVERLAY

#define BR_TEST_FLAG_OVERLAY ( _f)
Value:
if ((br->overlay_flags & _f) && !(def.overlay_flags & _f)) { \
printf("br->overlay_flags |= " #_f ";\n"); \
} \
else if (!(br->overlay_flags & _f) && (def.overlay_flags & _f)) { \
printf("br->overlay_flags &= ~" #_f ";\n"); \
} \
((void)0)

Referenced by BKE_brush_debug_print_state().

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 14 of file brush.cc.

◆ FROM_DEFAULT

#define FROM_DEFAULT ( member)
Value:
memcpy((void *)&brush->member, (void *)&brush_def->member, sizeof(brush->member))

Referenced by brush_defaults().

◆ FROM_DEFAULT_PTR

#define FROM_DEFAULT_PTR ( member)
Value:
memcpy(brush->member, brush_def->member, sizeof(brush->member))

Referenced by brush_defaults().

Function Documentation

◆ BKE_brush_add()

Brush * BKE_brush_add ( Main * bmain,
const char * name,
eObjectMode ob_mode )
Note
Resulting brush will have two users: one as a fake user, another is assumed to be used by the caller.

Definition at line 583 of file brush.cc.

References BKE_brush_init_curves_sculpt_settings(), BKE_brush_init_gpencil_settings(), BKE_id_new(), ELEM, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT_CURVES, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_VERTEX_GREASE_PENCIL, and OB_MODE_WEIGHT_GREASE_PENCIL.

Referenced by TEST_F(), and TEST_F().

◆ BKE_brush_alpha_get()

◆ BKE_brush_alpha_set()

◆ BKE_brush_calc_curve_factors()

◆ BKE_brush_color_get()

◆ BKE_brush_color_jitter_get_settings()

◆ BKE_brush_color_set()

◆ BKE_brush_color_texture_get()

const MTex * BKE_brush_color_texture_get ( const Brush * brush,
eObjectMode object_mode )

Get the color texture for this given object mode.

This is preferred above using mtex/mask_mtex attributes directly as due to legacy these attributes got switched in sculpt mode.

Definition at line 869 of file brush.cc.

References OB_MODE_SCULPT.

Referenced by do_projectpaint_thread().

◆ BKE_brush_curve_preset()

◆ BKE_brush_curve_strength() [1/2]

float BKE_brush_curve_strength ( const Brush * br,
float p,
const float len )

Definition at line 1561 of file brush.cc.

References BKE_brush_curve_strength(), Brush::curve, Brush::curve_preset, and len.

◆ BKE_brush_curve_strength() [2/2]

float BKE_brush_curve_strength ( eBrushCurvePreset preset,
const CurveMapping * cumap,
float distance,
float brush_radius )

Uses the brush curve control to find a strength value.

Definition at line 1510 of file brush.cc.

References BKE_curvemapping_evaluateF(), BRUSH_CURVE_CONSTANT, BRUSH_CURVE_CUSTOM, BRUSH_CURVE_INVSQUARE, BRUSH_CURVE_LIN, BRUSH_CURVE_POW4, BRUSH_CURVE_ROOT, BRUSH_CURVE_SHARP, BRUSH_CURVE_SMOOTH, BRUSH_CURVE_SMOOTHER, BRUSH_CURVE_SPHERE, distance(), pow3f(), and sqrtf.

Referenced by blender::ed::sculpt_paint::cloth::add_constraints_for_verts(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::add_point_under_brush_to_brush_buffer(), BKE_brush_curve_strength(), BKE_brush_curve_strength_clamped(), blender::ed::sculpt_paint::greasepencil::brush_fill_influence(), blender::ed::sculpt_paint::greasepencil::brush_point_influence(), blender::ed::sculpt_paint::greasepencil::brush_point_influence_mask(), calc_strength(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::compute_piecewise_linear_falloff(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::sculpt_paint::expand::gradient_value_get(), blender::ed::sculpt_paint::boundary::init_falloff_bmesh(), blender::ed::sculpt_paint::boundary::init_falloff_grids(), blender::ed::sculpt_paint::boundary::init_falloff_mesh(), blender::ed::sculpt_paint::paint_stroke_overlapped_curve(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::ed::sculpt_paint::pose::solve_roll_chain(), and blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook().

◆ BKE_brush_curve_strength_clamped()

float BKE_brush_curve_strength_clamped ( const Brush * br,
float p,
float len )

◆ BKE_brush_debug_print_state()

◆ BKE_brush_delete()

bool BKE_brush_delete ( Main * bmain,
Brush * brush )

◆ BKE_brush_duplicate()

Brush * BKE_brush_duplicate ( Main * bmain,
Brush * brush,
eDupli_ID_Flags dupflag,
uint duplicate_options )

Perform deep-copy of a Brush and its 'children' data-blocks.

Parameters
dupflagControls which sub-data are also duplicated (see eDupli_ID_Flags in DNA_userdef_types.h).
duplicate_optionsAdditional context information about current duplicate call (e.g. if it's part of a higher-level duplication or not, etc.). (see eLibIDDuplicateFlags in BKE_lib_id.hh).
Warning
By default, this functions will clear all bmain #ID.idnew pointers (BKE_main_id_newptr_and_tag_clear), and take care of post-duplication updates like remapping to new IDs (BKE_libblock_relink_to_newid). If LIB_ID_DUPLICATE_IS_SUBPROCESS duplicate option is passed on (typically when duplication is called recursively from another parent duplication operation), the caller is responsible to handle all of these operations.
Note
Caller MUST handle updates of the depsgraph (#DAG_relations_tag_update).

Definition at line 646 of file brush.cc.

References BKE_id_copy_for_duplicate(), BKE_libblock_relink_to_newid(), BKE_library_foreach_ID_link(), BKE_main_id_newptr_and_tag_clear(), BLI_assert, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, Brush::id, ID_TAG_NEW, IDWALK_CB_EMBEDDED, IDWALK_CB_EMBEDDED_NOT_OWNING, IDWALK_CB_LOOPBACK, IDWALK_NOP, IDWALK_RECURSE, LIB_ID_COPY_DEFAULT, LIB_ID_DUPLICATE_IS_ROOT_ID, LIB_ID_DUPLICATE_IS_SUBPROCESS, ID::tag, USER_DUP_LINKED_ID, and USER_DUP_OBDATA.

Referenced by blender::ed::sculpt_paint::brush_asset_save_as_exec(), TEST_F(), and TEST_F().

◆ BKE_brush_first_search()

Brush * BKE_brush_first_search ( Main * bmain,
const eObjectMode ob_mode )

Definition at line 727 of file brush.cc.

References Main::brushes, and LISTBASE_FOREACH.

◆ BKE_brush_gen_radial_control_imbuf()

ImBuf * BKE_brush_gen_radial_control_imbuf ( Brush * br,
bool secondary,
bool display_gradient )

◆ BKE_brush_has_cube_tip()

◆ BKE_brush_init_curves_sculpt_settings()

◆ BKE_brush_init_gpencil_settings()

◆ BKE_brush_input_samples_get()

◆ BKE_brush_input_samples_set()

void BKE_brush_input_samples_set ( const Scene * scene,
Brush * brush,
int value )

◆ BKE_brush_jitter_pos()

void BKE_brush_jitter_pos ( const Scene & scene,
const Brush & brush,
const float pos[2],
float jitterpos[2] )

◆ BKE_brush_mask_texture_get()

◆ BKE_brush_randomize_texture_coords()

◆ BKE_brush_sample_masktex()

◆ BKE_brush_sample_tex_3d()

◆ BKE_brush_scale_size()

void BKE_brush_scale_size ( int * r_brush_size,
float new_unprojected_radius,
float old_unprojected_radius )

Scale brush size to reflect a change in the brush's unprojected radius.

Definition at line 1328 of file brush.cc.

◆ BKE_brush_scale_unprojected_radius()

void BKE_brush_scale_unprojected_radius ( float * unprojected_radius,
int new_brush_size,
int old_brush_size )

Scale unprojected radius to reflect a change in the brush's 2D size.

Definition at line 1316 of file brush.cc.

◆ BKE_brush_secondary_color_get()

◆ BKE_brush_size_get()

int BKE_brush_size_get ( const Scene * scene,
const Brush * brush )

Definition at line 1210 of file brush.cc.

References UnifiedPaintSettings::flag, size(), UnifiedPaintSettings::size, Scene::toolsettings, ToolSettings::unified_paint_settings, and UNIFIED_PAINT_SIZE.

Referenced by BKE_brush_jitter_pos(), blender::ed::sculpt_paint::greasepencil::brush_radius(), blender::ed::sculpt_paint::brush_radius_get(), brush_scale_size_exec(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::vwpaint::get_brush_alpha_data(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw(), blender::ed::sculpt_paint::load_tex(), blender::ed::sculpt_paint::load_tex_cursor(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::object_space_radius_get(), blender::ed::sculpt_paint::paint_brush_update(), blender::ed::sculpt_paint::paint_cursor_context_init(), blender::ed::sculpt_paint::paint_cursor_update_pixel_radius(), blender::ed::sculpt_paint::paint_cursor_update_unprojected_radius(), blender::ed::sculpt_paint::paint_draw_cursor_overlay(), blender::ed::sculpt_paint::paint_draw_tex_overlay(), paint_proj_new_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::paint_stroke_new(), project_paint_begin(), blender::ed::sculpt_paint::smooth_brush_toggle_on(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_on(), texture_paint_camera_project_exec(), blender::ed::sculpt_paint::vwpaint::update_cache_variants(), blender::ed::sculpt_paint::update_modal_transform(), and blender::ed::sculpt_paint::use_add_density_mode().

◆ BKE_brush_size_set()

◆ BKE_brush_system_exit()

void BKE_brush_system_exit ( )

Definition at line 518 of file brush.cc.

References BLI_rng_free(), and brush_rng.

Referenced by BKE_blender_free().

◆ BKE_brush_system_init()

void BKE_brush_system_init ( )

Definition at line 512 of file brush.cc.

References BLI_rng_new(), BLI_rng_srandom(), and brush_rng.

Referenced by main().

◆ BKE_brush_tag_unsaved_changes()

void BKE_brush_tag_unsaved_changes ( Brush * brush)

Tag a linked brush as having changed settings so an indicator can be displayed to the user, showing that the brush settings differ from the state of the imported brush asset. Call every time a user visible change to the brush is done.

Since this is meant to indicate brushes that are known to differ from the linked source file, tagging is only performed for linked brushes. File local brushes are normal data-blocks that get saved with the file, and don't need special attention by the user.

For convenience, null may be passed for brush.

Definition at line 720 of file brush.cc.

References ID_IS_LINKED.

Referenced by BKE_brush_alpha_set(), BKE_brush_color_set(), BKE_brush_curve_preset(), BKE_brush_input_samples_set(), BKE_brush_size_set(), BKE_brush_unprojected_radius_set(), BKE_brush_weight_set(), BKE_gpencil_brush_material_set(), brush_colors_flip_exec(), brush_scale_size_exec(), brush_sculpt_curves_falloff_preset_exec(), blender::ed::transform::calculateCenterActive(), ED_render_id_flush_update(), blender::ui::greasepencil::eyedropper_set_brush_color(), blender::ed::transform::flushTransPaintCurve(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), paintcurve_delete_point_exec(), paintcurve_new_exec(), paintcurve_point_add(), paintcurve_slide_invoke(), set_current_brush_texture(), stencil_control_calculate(), stencil_fit_image_aspect_exec(), stencil_reset_transform_exec(), texture_changed(), blender::ed::greasepencil::toggle_weight_tool_direction_exec(), and ui_do_but_COLOR().

◆ BKE_brush_unprojected_radius_get()

◆ BKE_brush_unprojected_radius_set()

◆ BKE_brush_use_alpha_pressure()

◆ BKE_brush_use_locked_size()

◆ BKE_brush_use_size_pressure()

◆ BKE_brush_weight_get()

◆ BKE_brush_weight_set()

◆ brush_asset_metadata_ensure()

◆ brush_blend_read_after_liblink()

void brush_blend_read_after_liblink ( BlendLibReader * ,
ID * id )
static

◆ brush_blend_read_data()

◆ brush_blend_write()

◆ brush_copy_data()

◆ brush_defaults()

void brush_defaults ( Brush * brush)
static

◆ brush_foreach_id()

◆ brush_foreach_path()

void brush_foreach_path ( ID * id,
BPathForeachPathData * bpath_data )
static

Definition at line 216 of file brush.cc.

References BKE_bpath_foreach_path_fixed_process(), and Brush::icon_filepath.

◆ brush_free_data()

◆ brush_gen_texture()

bool brush_gen_texture ( const Brush * br,
const int side,
const bool use_secondary,
float * rect )
static

Definition at line 1576 of file brush.cc.

References Brush::mask_mtex, Brush::mtex, RE_texture_evaluate(), step, MTex::tex, x, and y.

Referenced by BKE_brush_gen_radial_control_imbuf().

◆ brush_init_data()

◆ brush_make_local()

Variable Documentation

◆ AssetType_BR

AssetTypeInfo AssetType_BR
static
Initial value:
= {
}
static void brush_asset_metadata_ensure(void *asset_ptr, AssetMetaData *asset_data)
Definition brush.cc:430

Definition at line 474 of file brush.cc.

◆ brush_rng

◆ IDType_ID_BR

IDTypeInfo IDType_ID_BR
Initial value:
= {
Brush::id_type,
sizeof(Brush),
"Brush",
N_("brushes"),
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_NO_ANIMDATA
Definition BKE_idtype.hh:46
@ IDTYPE_FLAGS_NO_MEMFILE_UNDO
Definition BKE_idtype.hh:55
#define BLT_I18NCONTEXT_ID_BRUSH
@ INDEX_ID_BR
Definition DNA_ID.h:1255
static void brush_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition brush.cc:225
static void brush_free_data(ID *id)
Definition brush.cc:127
static AssetTypeInfo AssetType_BR
Definition brush.cc:474
static void brush_blend_read_after_liblink(BlendLibReader *, ID *id)
Definition brush.cc:413
static void brush_foreach_id(ID *id, LibraryForeachIDData *data)
Definition brush.cc:201
static void brush_init_data(ID *id)
Definition brush.cc:53
static void brush_make_local(Main *bmain, ID *id, const int flags)
Definition brush.cc:164
static void brush_copy_data(Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag)
Definition brush.cc:67
static void brush_blend_read_data(BlendDataReader *reader, ID *id)
Definition brush.cc:292
static void brush_foreach_path(ID *id, BPathForeachPathData *bpath_data)
Definition brush.cc:216
#define FILTER_ID_MA
#define FILTER_ID_BR
#define FILTER_ID_TE
#define FILTER_ID_PC
#define FILTER_ID_IM
#define N_(msgid)

Definition at line 479 of file brush.cc.