Blender V4.3
BKE_paint.hh File Reference
#include <variant>
#include "BLI_array.hh"
#include "BLI_bit_vector.hh"
#include "BLI_map.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_offset_indices.hh"
#include "BLI_ordered_edge.hh"
#include "BLI_set.hh"
#include "BLI_shared_cache.hh"
#include "BLI_utility_mixins.hh"
#include "DNA_brush_enums.h"
#include "DNA_customdata_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_enums.h"
#include "BKE_pbvh.hh"
#include "BKE_subdiv_ccg.hh"

Go to the source code of this file.

Classes

struct  SculptPoseIKChainPreview
 
struct  SculptVertexInfo
 
struct  SculptBoundaryPreview
 
struct  SculptFakeNeighbors
 
struct  SculptTopologyIslandCache
 
struct  SculptSession
 

Namespaces

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::pbvh
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::expand
 
namespace  blender::ed::sculpt_paint::filter
 
namespace  blender::bke::object
 

Macros

#define PAINT_OVERRIDE_MASK
 
#define PAINT_SYMM_AREA_DEFAULT   0
 
#define PAINT_SYMM_AREAS   8
 
#define SCULPT_FACE_SET_NONE   0
 

Typedefs

using ActiveVert = std::variant<std::monostate, int, SubdivCCGCoord, BMVert *>
 

Enumerations

enum class  PaintMode : int8_t {
  Sculpt = 0 , Vertex = 1 , Weight = 2 , Texture3D = 3 ,
  Texture2D = 4 , GPencil = 6 , VertexGPencil = 7 , SculptGPencil = 8 ,
  WeightGPencil = 9 , SculptCurves = 10 , SculptGreasePencil = 11 , Invalid = 12
}
 
enum  ePaintOverlayControlFlags {
  PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY = 1 , PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY = (1 << 2) , PAINT_OVERLAY_INVALID_CURVE = (1 << 3) , PAINT_OVERLAY_OVERRIDE_CURSOR = (1 << 4) ,
  PAINT_OVERLAY_OVERRIDE_PRIMARY = (1 << 5) , PAINT_OVERLAY_OVERRIDE_SECONDARY = (1 << 6)
}
 
enum  ePaintSymmetryAreas { PAINT_SYMM_AREA_X = (1 << 0) , PAINT_SYMM_AREA_Y = (1 << 1) , PAINT_SYMM_AREA_Z = (1 << 2) }
 

Functions

 ENUM_OPERATORS (ePaintOverlayControlFlags, PAINT_OVERLAY_OVERRIDE_SECONDARY)
 
 ENUM_OPERATORS (ePaintSymmetryAreas, PAINT_SYMM_AREA_Z)
 
void BKE_paint_invalidate_overlay_tex (Scene *scene, ViewLayer *view_layer, const Tex *tex)
 
void BKE_paint_invalidate_cursor_overlay (Scene *scene, ViewLayer *view_layer, CurveMapping *curve)
 
void BKE_paint_invalidate_overlay_all ()
 
ePaintOverlayControlFlags BKE_paint_get_overlay_flags ()
 
void BKE_paint_reset_overlay_invalid (ePaintOverlayControlFlags flag)
 
void BKE_paint_set_overlay_override (enum eOverlayFlags flag)
 
PaletteBKE_palette_add (Main *bmain, const char *name)
 
PaletteColorBKE_palette_color_add (Palette *palette)
 
bool BKE_palette_is_empty (const Palette *palette)
 
void BKE_palette_color_remove (Palette *palette, PaletteColor *color)
 
void BKE_palette_clear (Palette *palette)
 
void BKE_palette_sort_hsv (tPaletteColorHSV *color_array, int totcol)
 
void BKE_palette_sort_svh (tPaletteColorHSV *color_array, int totcol)
 
void BKE_palette_sort_vhs (tPaletteColorHSV *color_array, int totcol)
 
void BKE_palette_sort_luminance (tPaletteColorHSV *color_array, int totcol)
 
bool BKE_palette_from_hash (Main *bmain, GHash *color_table, const char *name, bool linear)
 
PaintCurveBKE_paint_curve_add (Main *bmain, const char *name)
 
bool BKE_paint_ensure (ToolSettings *ts, Paint **r_paint)
 
void BKE_paint_init (Main *bmain, Scene *sce, PaintMode mode, const uchar col[3], bool ensure_brushes=true)
 
void BKE_paint_free (Paint *paint)
 
void BKE_paint_copy (const Paint *src, Paint *dst, int flag)
 
void BKE_paint_cavity_curve_preset (Paint *paint, int preset)
 
eObjectMode BKE_paint_object_mode_from_paintmode (PaintMode mode)
 
bool BKE_paint_ensure_from_paintmode (Scene *sce, PaintMode mode)
 
PaintBKE_paint_get_active_from_paintmode (Scene *sce, PaintMode mode)
 
const EnumPropertyItemBKE_paint_get_tool_enum_from_paintmode (PaintMode mode)
 
uint BKE_paint_get_brush_type_offset_from_paintmode (PaintMode mode)
 
std::optional< intBKE_paint_get_brush_type_from_obmode (const Brush *brush, const eObjectMode ob_mode)
 
std::optional< intBKE_paint_get_brush_type_from_paintmode (const Brush *brush, const PaintMode mode)
 
PaintBKE_paint_get_active (Scene *sce, ViewLayer *view_layer)
 
PaintBKE_paint_get_active_from_context (const bContext *C)
 
PaintMode BKE_paintmode_get_active_from_context (const bContext *C)
 
PaintMode BKE_paintmode_get_from_tool (const bToolRef *tref)
 
bool BKE_paint_use_unified_color (const ToolSettings *tool_settings, const Paint *paint)
 
BrushBKE_paint_brush (Paint *paint)
 
const BrushBKE_paint_brush_for_read (const Paint *paint)
 
BrushBKE_paint_brush_from_essentials (Main *bmain, eObjectMode obmode, const char *name)
 
bool BKE_paint_brush_poll (const Paint *paint, const Brush *brush)
 
bool BKE_paint_brush_set (Paint *paint, Brush *brush)
 
bool BKE_paint_brush_set (Main *bmain, Paint *paint, const AssetWeakReference *brush_asset_reference)
 
bool BKE_paint_brush_set_default (Main *bmain, Paint *paint)
 
bool BKE_paint_brush_set_essentials (Main *bmain, Paint *paint, const char *name)
 
std::optional< AssetWeakReferenceBKE_paint_brush_type_default_reference (eObjectMode ob_mode, std::optional< int > brush_type)
 
void BKE_paint_brushes_set_default_references (ToolSettings *ts)
 
void BKE_paint_brushes_ensure (Main *bmain, Paint *paint)
 
void BKE_paint_brushes_validate (Main *bmain, Paint *paint)
 
BrushBKE_paint_eraser_brush (Paint *paint)
 
const BrushBKE_paint_eraser_brush_for_read (const Paint *paint)
 
bool BKE_paint_eraser_brush_set (Paint *paint, Brush *brush)
 
BrushBKE_paint_eraser_brush_from_essentials (Main *bmain, eObjectMode ob_mode, const char *name)
 
bool BKE_paint_eraser_brush_set_default (Main *bmain, Paint *paint)
 
bool BKE_paint_eraser_brush_set_essentials (Main *bmain, Paint *paint, const char *name)
 
PaletteBKE_paint_palette (Paint *paint)
 
void BKE_paint_palette_set (Paint *paint, Palette *palette)
 
void BKE_paint_curve_clamp_endpoint_add_index (PaintCurve *pc, int add_index)
 
bool BKE_paint_select_face_test (const Object *ob)
 
bool BKE_paint_select_vert_test (const Object *ob)
 
bool BKE_paint_select_grease_pencil_test (const Object *ob)
 
bool BKE_paint_select_elem_test (const Object *ob)
 
bool BKE_paint_always_hide_test (const Object *ob)
 
bool paint_is_grid_face_hidden (blender::BoundedBitSpan grid_hidden, int gridsize, int x, int y)
 
bool paint_is_bmesh_face_hidden (const BMFace *f)
 
float paint_grid_paint_mask (const GridPaintMask *gpm, uint level, uint x, uint y)
 
void BKE_paint_face_set_overlay_color_get (int face_set, int seed, uchar r_color[4])
 
bool paint_calculate_rake_rotation (UnifiedPaintSettings &ups, const Brush &brush, const float mouse_pos[2], PaintMode paint_mode, bool stroke_has_started)
 
void paint_update_brush_rake_rotation (UnifiedPaintSettings &ups, const Brush &brush, float rotation)
 
void BKE_paint_stroke_get_average (const Scene *scene, const Object *ob, float stroke[3])
 
void BKE_paint_blend_write (BlendWriter *writer, Paint *paint)
 
void BKE_paint_blend_read_data (BlendDataReader *reader, const Scene *scene, Paint *paint)
 
void BKE_sculptsession_free (Object *ob)
 
void BKE_sculptsession_free_deformMats (SculptSession *ss)
 
void BKE_sculptsession_free_vwpaint_data (SculptSession *ss)
 
void BKE_sculptsession_free_pbvh (Object &object)
 
void BKE_sculptsession_bm_to_me (Object *ob, bool reorder)
 
void BKE_sculptsession_bm_to_me_for_render (Object *object)
 
void BKE_sculpt_color_layer_create_if_needed (Object *object)
 
void BKE_sculpt_update_object_for_edit (Depsgraph *depsgraph, Object *ob_orig, bool is_paint_tool)
 
void BKE_sculpt_update_object_before_eval (Object *ob_eval)
 
void BKE_sculpt_update_object_after_eval (Depsgraph *depsgraph, Object *ob_eval)
 
MultiresModifierDataBKE_sculpt_multires_active (const Scene *scene, Object *ob)
 
void BKE_sculpt_mask_layers_ensure (Depsgraph *depsgraph, Main *bmain, Object *ob, MultiresModifierData *mmd)
 
void BKE_sculpt_toolsettings_data_ensure (Main *bmain, Scene *scene)
 
void BKE_sculpt_sync_face_visibility_to_grids (const Mesh &mesh, SubdivCCG &subdiv_ccg)
 
bool BKE_sculptsession_use_pbvh_draw (const Object *ob, const RegionView3D *rv3d)
 
pbvh::Treeblender::bke::object::pbvh_ensure (Depsgraph &depsgraph, Object &object)
 
pbvh::Treeblender::bke::object::pbvh_get (Object &object)
 
const pbvh::Treeblender::bke::object::pbvh_get (const Object &object)
 
bool BKE_object_sculpt_use_dyntopo (const Object *object)
 
char * BKE_paint_canvas_key_get (PaintModeSettings *settings, Object *ob)
 
bool BKE_paint_canvas_image_get (PaintModeSettings *settings, Object *ob, Image **r_image, ImageUser **r_image_user)
 
int BKE_paint_canvas_uvmap_layer_index_get (const PaintModeSettings *settings, Object *ob)
 
void BKE_sculpt_check_cavity_curves (Sculpt *sd)
 
CurveMappingBKE_sculpt_default_cavity_curve ()
 

Variables

const uchar PAINT_CURSOR_SCULPT [3]
 
const uchar PAINT_CURSOR_VERTEX_PAINT [3]
 
const uchar PAINT_CURSOR_WEIGHT_PAINT [3]
 
const uchar PAINT_CURSOR_TEXTURE_PAINT [3]
 
const uchar PAINT_CURSOR_SCULPT_CURVES [3]
 
const uchar PAINT_CURSOR_PAINT_GREASE_PENCIL [3]
 
const uchar PAINT_CURSOR_SCULPT_GREASE_PENCIL [3]
 

Macro Definition Documentation

◆ PAINT_OVERRIDE_MASK

#define PAINT_OVERRIDE_MASK
Value:

Definition at line 133 of file BKE_paint.hh.

Referenced by BKE_paint_set_overlay_override().

◆ PAINT_SYMM_AREA_DEFAULT

#define PAINT_SYMM_AREA_DEFAULT   0

Defines 8 areas resulting of splitting the object space by the XYZ axis planes. This is used to flip or mirror transform values depending on where the vertex is and where the transform operation started to support XYZ symmetry on those operations in a predictable way.

Definition at line 142 of file BKE_paint.hh.

Referenced by SCULPT_get_vertex_symm_area().

◆ PAINT_SYMM_AREAS

◆ SCULPT_FACE_SET_NONE

#define SCULPT_FACE_SET_NONE   0

Definition at line 341 of file BKE_paint.hh.

Referenced by blender::ed::sculpt_paint::face_set::active_face_set_get(), blender::ed::sculpt_paint::expand::active_face_set_id_get(), blender::ed::sculpt_paint::face_set::active_update_and_get(), blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), blender::ed::sculpt_paint::face_set::check_single_face_set(), face_set_extract_invoke(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::ed::sculpt_paint::face_set::initialize_none_to_id(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), blender::ed::sculpt_paint::expand::set_initial_components_for_mouse(), blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_face_set_get(), blender::ed::sculpt_paint::face_set::vert_has_face_set(), and blender::ed::sculpt_paint::face_set::vert_has_face_set().

Typedef Documentation

◆ ActiveVert

using ActiveVert = std::variant<std::monostate, int, SubdivCCGCoord, BMVert *>

Definition at line 377 of file BKE_paint.hh.

Enumeration Type Documentation

◆ ePaintOverlayControlFlags

Enumerator
PAINT_OVERLAY_INVALID_TEXTURE_PRIMARY 
PAINT_OVERLAY_INVALID_TEXTURE_SECONDARY 
PAINT_OVERLAY_INVALID_CURVE 
PAINT_OVERLAY_OVERRIDE_CURSOR 
PAINT_OVERLAY_OVERRIDE_PRIMARY 
PAINT_OVERLAY_OVERRIDE_SECONDARY 

Definition at line 123 of file BKE_paint.hh.

◆ ePaintSymmetryAreas

Enumerator
PAINT_SYMM_AREA_X 
PAINT_SYMM_AREA_Y 
PAINT_SYMM_AREA_Z 

Definition at line 144 of file BKE_paint.hh.

◆ PaintMode

enum class PaintMode : int8_t
strong
Enumerator
Sculpt 
Vertex 

Vertex color.

Weight 
Texture3D 

3D view (projection painting).

Texture2D 

Image space (2D painting).

GPencil 
VertexGPencil 
SculptGPencil 
WeightGPencil 
SculptCurves 

Curves.

SculptGreasePencil 

Grease Pencil.

Invalid 

Keep last.

Definition at line 99 of file BKE_paint.hh.

Function Documentation

◆ BKE_object_sculpt_use_dyntopo()

bool BKE_object_sculpt_use_dyntopo ( const Object * object)

Definition at line 2857 of file paint.cc.

◆ BKE_paint_always_hide_test()

bool BKE_paint_always_hide_test ( const Object * ob)

Checks if face/vertex hiding is always applied in the current mode. Returns true in vertex/weight paint.

Definition at line 1638 of file paint.cc.

References Object::data, Object::mode, OB_MESH, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, and Object::type.

Referenced by face_vert_reveal_poll().

◆ BKE_paint_blend_read_data()

◆ BKE_paint_blend_write()

◆ BKE_paint_brush()

Brush * BKE_paint_brush ( Paint * paint)

Definition at line 649 of file paint.cc.

References BKE_paint_brush_for_read().

Referenced by BKE_paint_brushes_validate(), BKE_paint_invalidate_cursor_overlay(), BKE_paint_invalidate_overlay_tex(), blender::ed::sculpt_paint::brush_asset_delete_exec(), blender::ed::sculpt_paint::brush_asset_delete_invoke(), blender::ed::sculpt_paint::brush_asset_delete_poll(), blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_edit_metadata_poll(), blender::ed::sculpt_paint::brush_asset_load_preview_exec(), blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::ed::sculpt_paint::brush_asset_revert_poll(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::sculpt_paint::brush_asset_save_as_poll(), blender::ed::sculpt_paint::brush_asset_save_exec(), blender::ed::sculpt_paint::brush_asset_save_poll(), brush_colors_flip_exec(), brush_curve_preset_exec(), brush_curve_preset_poll(), blender::ed::sculpt_paint::brush_exit_tex(), brush_scale_size_exec(), brush_sculpt_curves_falloff_preset_exec(), brush_sculpt_curves_falloff_preset_poll(), blender::ed::sculpt_paint::brush_tool_get(), buttons_context_path_brush(), buttons_texture_users_from_context(), blender::ed::sculpt_paint::trim::calculate_depth(), calculateCenterActive(), createTransPaintCurveVerts(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), ED_paint_proj_mesh_data_check(), ED_space_image_paint_curve(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ui::greasepencil::eyedropper_set_brush_color(), flushTransPaintCurve(), blender::ed::sculpt_paint::GreasePencilFillOpData::from_context(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), blender::ed::sculpt_paint::greasepencil::get_drawings_for_painting(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::grease_pencil_fill_init(), blender::ed::sculpt_paint::grease_pencil_fill_invoke(), blender::ed::greasepencil::grease_pencil_primitive_invoke(), blender::ed::greasepencil::grease_pencil_vertex_paint_set_exec(), image_paint_brush(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_stroke(), initTransInfo(), is_brush_related_tool(), blender::ed::greasepencil::keymap_grease_pencil_brush_stroke_poll(), blender::ed::greasepencil::keymap_grease_pencil_fill_tool_poll(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::new_selection_paint_operation(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), over_mesh(), OVERLAY_edit_uv_cache_init(), OVERLAY_edit_uv_init(), paint_2d_new_stroke(), blender::ed::sculpt_paint::paint_cursor_context_init(), blender::ed::sculpt_paint::paint_cursor_update_pixel_radius(), paint_curve_poll(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), paint_proj_new_stroke(), paint_sample_color(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::paint_stroke_new(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_update_step(), paint_weight_gradient_exec(), paintcurve_delete_point_exec(), paintcurve_new_exec(), paintcurve_point_add(), paintcurve_point_select(), paintcurve_slide_invoke(), paintcurve_undosys_poll(), paintcurve_undosys_step_encode(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::PaintOperationExecutor(), project_state_init(), sample_color_exec(), blender::ed::sculpt_paint::sample_color_invoke(), sample_color_invoke(), sample_color_modal(), blender::ed::sculpt_paint::sculpt_brush_stroke_invoke(), SCULPT_stroke_get_location(), SCULPT_stroke_get_location_ex(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::sculpt_update_cache_variants(), blender::ed::sculpt_paint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::smooth_brush_toggle_on(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_on(), stencil_control_invoke(), stencil_control_poll(), stencil_fit_image_aspect_exec(), stencil_reset_transform_exec(), blender::ed::sculpt_paint::stroke_done(), blender::ed::sculpt_paint::stroke_test_start(), blender::ed::greasepencil::stroke_trim_execute(), texture_get_from_context(), blender::ed::sculpt_paint::image::ops::paint::texture_paint_init(), blender::ed::greasepencil::toggle_weight_tool_direction(), blender::ed::greasepencil::toggle_weight_tool_direction_poll(), ui_do_but_COLOR(), blender::ed::sculpt_paint::vwpaint::update_cache_invariants(), blender::ed::sculpt_paint::vwpaint::update_cache_variants(), vertex_paint_poll_ex(), vpaint_stroke_test_start(), vpaint_stroke_update_step(), weight_paint_poll_ex(), weight_paint_set_exec(), blender::ed::greasepencil::weight_sample_invoke(), weight_sample_invoke(), wpaint_do_symmetrical_brush_actions(), wpaint_stroke_test_start(), and wpaint_stroke_update_step().

◆ BKE_paint_brush_for_read()

const Brush * BKE_paint_brush_for_read ( const Paint * paint)

Definition at line 654 of file paint.cc.

References Paint::brush.

Referenced by blender::draw::overlay::MeshUVs::begin_sync(), BKE_paint_brush(), brush_init_tex(), brush_strength(), brush_stroke_init(), blender::ed::sculpt_paint::vwpaint::brush_use_accumulate(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::expand::cache_initial_config_set(), blender::ed::sculpt_paint::calc_sculpt_normal(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_foces(), blender::ed::sculpt_paint::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), blender::ed::sculpt_paint::do_clay_brush(), blender::ed::sculpt_paint::do_clay_strips_brush(), blender::ed::sculpt_paint::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::do_displacement_eraser_brush(), blender::ed::sculpt_paint::do_displacement_smear_brush(), blender::ed::sculpt_paint::do_draw_brush(), blender::ed::sculpt_paint::do_draw_face_sets_brush(), blender::ed::sculpt_paint::do_draw_sharp_brush(), blender::ed::sculpt_paint::do_draw_vector_displacement_brush(), blender::ed::sculpt_paint::do_elastic_deform_brush(), blender::ed::sculpt_paint::do_enhance_details_brush(), blender::ed::sculpt_paint::do_grab_brush(), blender::ed::sculpt_paint::do_inflate_brush(), blender::ed::sculpt_paint::do_layer_brush(), blender::ed::sculpt_paint::do_mask_brush(), blender::ed::sculpt_paint::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::do_pinch_brush(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::do_relax_face_sets_brush(), blender::ed::sculpt_paint::do_rotate_brush(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush(), blender::ed::sculpt_paint::do_smooth_brush(), blender::ed::sculpt_paint::do_smooth_mask_brush(), blender::ed::sculpt_paint::do_snake_hook_brush(), blender::ed::sculpt_paint::do_surface_smooth_brush(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), blender::ed::sculpt_paint::do_thumb_brush(), blender::ed::sculpt_paint::do_topology_relax_brush(), blender::ed::sculpt_paint::do_topology_slide_brush(), blender::draw::overlay::MeshUVs::end_sync(), blender::ed::sculpt_paint::cloth::ensure_nodes_constraints(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::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::auto_mask::fill_topology_automasking_factors_bmesh(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_grids(), blender::ed::sculpt_paint::auto_mask::fill_topology_automasking_factors_mesh(), blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_draw_operator_invoke(), blender::ed::sculpt_paint::grease_pencil_sculpt_paint_invoke(), blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_invoke(), blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_invoke(), image_paint_brush_uses_canvas(), blender::ed::sculpt_paint::auto_mask::init_face_sets_masking(), is_cursor_visible(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_poll(), blender::ed::sculpt_paint::new_grow_shrink_operation(), blender::ed::sculpt_paint::new_pinch_operation(), blender::ed::sculpt_paint::offset_positions(), paint_and_tex_color_alpha_intern(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), palette_color_add_exec(), blender::ed::sculpt_paint::undo::restore_from_undo_step(), restore_from_undo_step_if_necessary(), blender::ed::sculpt_paint::dyntopo::sample_detail_dyntopo(), SCULPT_brush_plane_offset_get(), blender::ed::sculpt_paint::sculpt_brush_stroke_cancel(), sculpt_brush_type_name(), blender::ed::sculpt_paint::cloth::sculpt_cloth_ensure_constraints_in_simulation_area(), SCULPT_cursor_geometry_info_update(), blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(), SCULPT_do_paint_brush_image(), blender::ed::sculpt_paint::sculpt_fix_noise_tear(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::start_brush_operation(), stroke_undo_begin(), blender::ed::sculpt_paint::stroke_update_step(), update_brush_local_mat(), blender::ed::sculpt_paint::update_modal_transform(), blender::ed::sculpt_paint::update_sculpt_normal(), blender::ed::sculpt_paint::use_add_density_mode(), blender::ed::sculpt_paint::vwpaint::use_normal(), vpaint_blend(), vpaint_do_symmetrical_brush_actions(), vpaint_get_current_col(), wpaint_blend(), and wpaint_stroke_test_start().

◆ BKE_paint_brush_from_essentials()

Brush * BKE_paint_brush_from_essentials ( Main * bmain,
eObjectMode obmode,
const char * name )

◆ BKE_paint_brush_poll()

bool BKE_paint_brush_poll ( const Paint * paint,
const Brush * brush )

Check if brush brush may be set/activated for paint. Passing null for brush will return true.

Definition at line 659 of file paint.cc.

References Brush::ob_mode, Paint_Runtime::ob_mode, and Paint::runtime.

Referenced by BKE_paint_brush_set(), BKE_paint_brush_set(), and WM_toolsystem_activate_brush_and_tool().

◆ BKE_paint_brush_set() [1/2]

bool BKE_paint_brush_set ( Main * bmain,
Paint * paint,
const AssetWeakReference * brush_asset_reference )

◆ BKE_paint_brush_set() [2/2]

bool BKE_paint_brush_set ( Paint * paint,
Brush * brush )

Activates brush for painting, and updates Paint.brush_asset_reference so the brush can be restored after file read. No change is done if BKE_paint_brush_poll() returns false.

Returns
True on success. If brush is already active, this is considered a success (the brush asset reference will still be updated).
Note
WM_toolsystem_activate_brush_and_tool() might be the preferable way to change the active brush. It also lets the tool-system decide if the active tool should be changed given the type of brush, and it updates the "last used brush" for the previous tool. BKE_paint_brush_set() should only be called to force a brush to be active, circumventing the tool system.

Definition at line 714 of file paint.cc.

References asset_reference_create_from_brush(), BKE_paint_brush_poll(), Paint::brush, and Paint::brush_asset_reference.

Referenced by blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::ed::sculpt_paint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::smooth_brush_toggle_on(), blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_on(), toolsystem_brush_activate_from_toolref_for_object_paint(), and WM_toolsystem_activate_brush_and_tool().

◆ BKE_paint_brush_set_default()

◆ BKE_paint_brush_set_essentials()

bool BKE_paint_brush_set_essentials ( Main * bmain,
Paint * paint,
const char * name )

◆ BKE_paint_brush_type_default_reference()

std::optional< AssetWeakReference > BKE_paint_brush_type_default_reference ( eObjectMode ob_mode,
std::optional< int > brush_type )

◆ BKE_paint_brushes_ensure()

void BKE_paint_brushes_ensure ( Main * bmain,
Paint * paint )

Make sure the active brush asset is available as active brush, importing it if necessary. If there is no user set active brush, the default one is used/imported from the essentials asset library.

It's good to avoid this until the user actually shows intentions to use brushes, to avoid unused brushes in files. E.g. use this when entering a paint mode, but not for versioning.

Also handles the active eraser brush asset.

Definition at line 1762 of file paint.cc.

References BKE_paint_brush_set_default(), BKE_paint_eraser_brush_set_default(), Paint::brush, Paint::brush_asset_reference, Paint::eraser_brush, Paint::eraser_brush_asset_reference, paint_brush_update_from_asset_reference(), and paint_eraser_brush_set_from_asset_reference().

Referenced by BKE_paint_init(), BKE_sculpt_toolsettings_data_ensure(), blender::ed::sculpt_paint::curves_sculptmode_enter(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::ed::greasepencil::sculptmode_toggle_exec(), and blender::ed::greasepencil::vertexmode_toggle_exec().

◆ BKE_paint_brushes_set_default_references()

◆ BKE_paint_brushes_validate()

◆ BKE_paint_canvas_image_get()

◆ BKE_paint_canvas_key_get()

char * BKE_paint_canvas_key_get ( PaintModeSettings * settings,
Object * ob )

Create a key that can be used to compare with previous ones to identify changes. The resulting 'string' is owned by the caller.

Definition at line 110 of file blenkernel/intern/paint_canvas.cc.

References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_paint_canvas_image_get(), BKE_paint_canvas_uvmap_layer_index_get(), BLI_strdup(), image(), LISTBASE_FOREACH, ImageUser::tile, ImBuf::x, and ImBuf::y.

Referenced by sculpt_update_object().

◆ BKE_paint_canvas_uvmap_layer_index_get()

◆ BKE_paint_cavity_curve_preset()

◆ BKE_paint_copy()

void BKE_paint_copy ( const Paint * src,
Paint * dst,
int flag )

Called when copying scene settings, so even if 'src' and 'tar' are the same still do a id_us_plus(), rather than if we were copying between 2 existing scenes where a matching value should decrease the existing user count as with #paint_brush_set()

Definition at line 1818 of file paint.cc.

References ToolSystemBrushBindings::active_brush_per_brush_type, BKE_curvemapping_copy(), BLI_duplicatelist(), BLI_strdup(), Paint::brush, Paint::brush_asset_reference, Paint::cavity_curve, Paint::eraser_brush_asset_reference, flag, id_us_plus(), LIB_ID_CREATE_NO_USER_REFCOUNT, LISTBASE_FOREACH, ToolSystemBrushBindings::main_brush_asset_reference, Paint::palette, and Paint::tool_brush_bindings.

Referenced by BKE_toolsettings_copy().

◆ BKE_paint_curve_add()

PaintCurve * BKE_paint_curve_add ( Main * bmain,
const char * name )

Definition at line 1339 of file paint.cc.

References BKE_id_new(), and ID_PC.

Referenced by paintcurve_for_brush_add().

◆ BKE_paint_curve_clamp_endpoint_add_index()

void BKE_paint_curve_clamp_endpoint_add_index ( PaintCurve * pc,
int add_index )

◆ BKE_paint_ensure()

◆ BKE_paint_ensure_from_paintmode()

◆ BKE_paint_eraser_brush()

◆ BKE_paint_eraser_brush_for_read()

const Brush * BKE_paint_eraser_brush_for_read ( const Paint * paint)

Definition at line 1160 of file paint.cc.

References Paint::eraser_brush.

Referenced by BKE_paint_eraser_brush().

◆ BKE_paint_eraser_brush_from_essentials()

Brush * BKE_paint_eraser_brush_from_essentials ( Main * bmain,
eObjectMode ob_mode,
const char * name )

◆ BKE_paint_eraser_brush_set()

◆ BKE_paint_eraser_brush_set_default()

bool BKE_paint_eraser_brush_set_default ( Main * bmain,
Paint * paint )

◆ BKE_paint_eraser_brush_set_essentials()

bool BKE_paint_eraser_brush_set_essentials ( Main * bmain,
Paint * paint,
const char * name )

◆ BKE_paint_face_set_overlay_color_get()

◆ BKE_paint_free()

◆ BKE_paint_get_active()

◆ BKE_paint_get_active_from_context()

Paint * BKE_paint_get_active_from_context ( const bContext * C)

Definition at line 477 of file paint.cc.

References BKE_paint_get_active(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), ToolSettings::imapaint, Object::mode, SpaceImage::mode, OB_MODE_EDIT, ImagePaintSettings::paint, SI_MODE_PAINT, and Scene::toolsettings.

Referenced by blender::ed::sculpt_paint::brush_asset_activate_exec(), blender::ed::sculpt_paint::brush_asset_delete_exec(), blender::ed::sculpt_paint::brush_asset_delete_invoke(), blender::ed::sculpt_paint::brush_asset_delete_poll(), blender::ed::sculpt_paint::brush_asset_edit_metadata_exec(), blender::ed::sculpt_paint::brush_asset_edit_metadata_invoke(), blender::ed::sculpt_paint::brush_asset_edit_metadata_poll(), blender::ed::sculpt_paint::brush_asset_load_preview_exec(), blender::ed::sculpt_paint::brush_asset_revert_exec(), blender::ed::sculpt_paint::brush_asset_revert_poll(), blender::ed::sculpt_paint::brush_asset_save_as_exec(), blender::ed::sculpt_paint::brush_asset_save_as_invoke(), blender::ed::sculpt_paint::brush_asset_save_as_poll(), blender::ed::sculpt_paint::brush_asset_save_exec(), blender::ed::sculpt_paint::brush_asset_save_poll(), brush_colors_flip_exec(), brush_curve_preset_exec(), brush_curve_preset_poll(), brush_scale_size_exec(), brush_sculpt_curves_falloff_preset_exec(), brush_sculpt_curves_falloff_preset_poll(), blender::ed::sculpt_paint::brush_tool_get(), buttons_texture_users_from_context(), blender::ed::sculpt_paint::expand::cache_initial_config_set(), createTransPaintCurveVerts(), drw_sculpt_generate_calls(), flushTransPaintCurve(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), blender::ed::sculpt_paint::greasepencil::get_drawings_for_painting(), blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_draw_operator_invoke(), blender::ed::sculpt_paint::grease_pencil_sculpt_paint_invoke(), blender::ed::sculpt_paint::grease_pencil_vertex_brush_stroke_invoke(), blender::ed::greasepencil::grease_pencil_vertex_paint_set_exec(), blender::ed::sculpt_paint::grease_pencil_weight_brush_stroke_invoke(), image_paint_brush_uses_canvas(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_stroke(), initTransInfo(), is_brush_related_tool(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), paint_2d_new_stroke(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_cursor_context_init(), paint_curve_poll(), blender::ed::sculpt_paint::paint_draw_line_cursor(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), paint_sample_color(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::image::ops::paint::paint_stroke_done(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::paint_stroke_new(), paintcurve_delete_point_exec(), paintcurve_new_exec(), paintcurve_point_add(), paintcurve_point_select(), paintcurve_slide_invoke(), paintcurve_undosys_poll(), paintcurve_undosys_step_encode(), palette_color_add_exec(), palette_color_delete_exec(), palette_color_move_exec(), palette_join_exec(), palette_new_exec(), palette_poll(), palette_sort_exec(), project_state_init(), sample_color_exec(), sample_color_invoke(), sample_color_modal(), blender::draw::sculpt_batches_get_ex(), SCULPT_cursor_geometry_info_update(), SCULPT_stroke_get_location(), SCULPT_stroke_get_location_ex(), stencil_control_invoke(), stencil_control_poll(), stencil_fit_image_aspect_exec(), stencil_reset_transform_exec(), blender::ed::greasepencil::stroke_trim_execute(), blender::ed::greasepencil::toggle_weight_tool_direction(), blender::ed::greasepencil::toggle_weight_tool_direction_poll(), ui_do_but_COLOR(), and blender::ed::sculpt_paint::visit_active_library_catalogs_catalog_for_search_fn().

◆ BKE_paint_get_active_from_paintmode()

◆ BKE_paint_get_brush_type_from_obmode()

◆ BKE_paint_get_brush_type_from_paintmode()

◆ BKE_paint_get_brush_type_offset_from_paintmode()

uint BKE_paint_get_brush_type_offset_from_paintmode ( PaintMode mode)

◆ BKE_paint_get_overlay_flags()

◆ BKE_paint_get_tool_enum_from_paintmode()

◆ BKE_paint_init()

◆ BKE_paint_invalidate_cursor_overlay()

void BKE_paint_invalidate_cursor_overlay ( Scene * scene,
ViewLayer * view_layer,
CurveMapping * curve )

◆ BKE_paint_invalidate_overlay_all()

◆ BKE_paint_invalidate_overlay_tex()

void BKE_paint_invalidate_overlay_tex ( Scene * scene,
ViewLayer * view_layer,
const Tex * tex )

◆ BKE_paint_object_mode_from_paintmode()

◆ BKE_paint_palette()

Palette * BKE_paint_palette ( Paint * paint)

Definition at line 1345 of file paint.cc.

References Paint::palette.

Referenced by paint_sample_color().

◆ BKE_paint_palette_set()

void BKE_paint_palette_set ( Paint * paint,
Palette * palette )

◆ BKE_paint_reset_overlay_invalid()

void BKE_paint_reset_overlay_invalid ( ePaintOverlayControlFlags flag)

◆ BKE_paint_select_elem_test()

bool BKE_paint_select_elem_test ( const Object * ob)

used to check if selection is possible (when we don't care if its face or vert)

Definition at line 1632 of file paint.cc.

References BKE_paint_select_face_test(), BKE_paint_select_grease_pencil_test(), and BKE_paint_select_vert_test().

Referenced by face_vert_reveal_poll(), mask_paint_poll(), view3d_circle_select_exec(), view3d_select_exec(), and view3d_selectable_data().

◆ BKE_paint_select_face_test()

◆ BKE_paint_select_grease_pencil_test()

bool BKE_paint_select_grease_pencil_test ( const Object * ob)

◆ BKE_paint_select_vert_test()

bool BKE_paint_select_vert_test ( const Object * ob)

◆ BKE_paint_set_overlay_override()

◆ BKE_paint_stroke_get_average()

void BKE_paint_stroke_get_average ( const Scene * scene,
const Object * ob,
float stroke[3] )

◆ BKE_paint_use_unified_color()

◆ BKE_paintmode_get_active_from_context()

PaintMode BKE_paintmode_get_active_from_context ( const bContext * C)

Definition at line 506 of file paint.cc.

References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), GPencil, Invalid, Object::mode, SpaceImage::mode, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL, OB_MODE_EDIT, OB_MODE_PAINT_GREASE_PENCIL, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_MODE_SCULPT_GREASE_PENCIL, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_GREASE_PENCIL, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_GREASE_PENCIL, OB_MODE_WEIGHT_PAINT, Sculpt, SculptCurves, SculptGPencil, SculptGreasePencil, SI_MODE_PAINT, Texture2D, Texture3D, Object::type, Vertex, VertexGPencil, Weight, and WeightGPencil.

Referenced by brush_type_matches_active_tool(), blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::grease_pencil_brush_stroke_invoke(), image_undosys_step_encode(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_cursor_context_init(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::paint_stroke_curve_end(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::paint_stroke_new(), paintcurve_cursor_invoke(), paintcurve_draw_exec(), palette_color_add_exec(), sample_color_exec(), sample_color_invoke(), sample_color_modal(), stencil_control_poll(), ui_apply_but_undo(), blender::ed::sculpt_paint::undo::use_multires_mesh(), and WM_toolsystem_activate_brush_and_tool().

◆ BKE_paintmode_get_from_tool()

◆ BKE_palette_add()

Palette * BKE_palette_add ( Main * bmain,
const char * name )

◆ BKE_palette_clear()

void BKE_palette_clear ( Palette * palette)

Definition at line 1380 of file paint.cc.

References Palette::active_color, BLI_freelistN(), and Palette::colors.

◆ BKE_palette_color_add()

◆ BKE_palette_color_remove()

void BKE_palette_color_remove ( Palette * palette,
PaletteColor * color )

Remove color from palette. Must be certain color is inside the palette!

Definition at line 1364 of file paint.cc.

References Palette::active_color, BLI_listbase_count_at_most(), BLI_listbase_is_empty(), BLI_remlink(), Palette::colors, and MEM_freeN().

Referenced by palette_color_delete_exec(), palette_join_exec(), palette_sort_exec(), and ui_do_but_COLOR().

◆ BKE_palette_from_hash()

◆ BKE_palette_is_empty()

bool BKE_palette_is_empty ( const Palette * palette)

Definition at line 1399 of file paint.cc.

References BLI_listbase_is_empty(), and Palette::colors.

◆ BKE_palette_sort_hsv()

void BKE_palette_sort_hsv ( tPaletteColorHSV * color_array,
int totcol )

Definition at line 1520 of file paint.cc.

References palettecolor_compare_hsv().

Referenced by BKE_palette_from_hash(), and palette_sort_exec().

◆ BKE_palette_sort_luminance()

void BKE_palette_sort_luminance ( tPaletteColorHSV * color_array,
int totcol )

Definition at line 1538 of file paint.cc.

References palettecolor_compare_luminance().

Referenced by palette_sort_exec().

◆ BKE_palette_sort_svh()

void BKE_palette_sort_svh ( tPaletteColorHSV * color_array,
int totcol )

Definition at line 1526 of file paint.cc.

References palettecolor_compare_svh().

Referenced by palette_sort_exec().

◆ BKE_palette_sort_vhs()

void BKE_palette_sort_vhs ( tPaletteColorHSV * color_array,
int totcol )

Definition at line 1532 of file paint.cc.

References palettecolor_compare_vhs().

Referenced by palette_sort_exec().

◆ BKE_sculpt_check_cavity_curves()

void BKE_sculpt_check_cavity_curves ( Sculpt * sd)

◆ BKE_sculpt_color_layer_create_if_needed()

◆ BKE_sculpt_default_cavity_curve()

◆ BKE_sculpt_mask_layers_ensure()

◆ BKE_sculpt_multires_active()

◆ BKE_sculpt_sync_face_visibility_to_grids()

◆ BKE_sculpt_toolsettings_data_ensure()

◆ BKE_sculpt_update_object_after_eval()

void BKE_sculpt_update_object_after_eval ( Depsgraph * depsgraph,
Object * ob_eval )

Definition at line 2568 of file paint.cc.

References DEG_get_original_object(), depsgraph, and sculpt_update_object().

Referenced by blender::bke::mesh_build_data().

◆ BKE_sculpt_update_object_before_eval()

◆ BKE_sculpt_update_object_for_edit()

void BKE_sculpt_update_object_for_edit ( Depsgraph * depsgraph,
Object * ob_orig,
bool is_paint_tool )
Warning
Expects a fully evaluated depsgraph.

Definition at line 2601 of file paint.cc.

References BLI_assert, DEG_get_evaluated_object(), DEG_get_original_object(), depsgraph, and sculpt_update_object().

Referenced by blender::ed::sculpt_paint::undo::bmesh_restore(), brush_stroke_init(), blender::ed::sculpt_paint::face_set::change_visibility_exec(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::ed::sculpt_paint::face_set::edit_op_init(), blender::ed::sculpt_paint::face_set::edit_op_invoke(), blender::ed::sculpt_paint::geometry_preview_lines_update(), blender::ed::sculpt_paint::face_set::gesture_begin(), blender::ed::sculpt_paint::mask::gesture_begin(), blender::ed::sculpt_paint::project::gesture_begin(), blender::ed::sculpt_paint::trim::gesture_begin(), blender::ed::sculpt_paint::face_set::init_op_exec(), blender::ed::sculpt_paint::init_sculpt_mode_session(), blender::ed::sculpt_paint::vwpaint::init_session(), blender::ed::sculpt_paint::vwpaint::init_stroke(), blender::ed::sculpt_paint::init_transform(), blender::ed::sculpt_paint::mask::mask_by_color_invoke(), blender::ed::sculpt_paint::mask::mask_flood_fill_exec(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), blender::ed::sculpt_paint::paint_cursor_preview_boundary_data_update(), blender::ed::sculpt_paint::undo::restore_active_shape_key(), blender::ed::sculpt_paint::undo::restore_list(), blender::ed::sculpt_paint::sample_color_invoke(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_invoke(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::color::sculpt_color_filter_init(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_modal(), blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec(), blender::ed::sculpt_paint::mask::sculpt_mask_init_exec(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_start(), SCULPT_stroke_modifiers_check(), blender::ed::sculpt_paint::set_persistent_base_exec(), blender::ed::sculpt_paint::set_pivot_position_exec(), transform_active_color(), blender::ed::sculpt_paint::update_modal_transform(), vertex_color_set_exec(), and blender::ed::object::voxel_remesh_exec().

◆ BKE_sculptsession_bm_to_me()

◆ BKE_sculptsession_bm_to_me_for_render()

void BKE_sculptsession_bm_to_me_for_render ( Object * object)

◆ BKE_sculptsession_free()

◆ BKE_sculptsession_free_deformMats()

◆ BKE_sculptsession_free_pbvh()

◆ BKE_sculptsession_free_vwpaint_data()

◆ BKE_sculptsession_use_pbvh_draw()

◆ ENUM_OPERATORS() [1/2]

◆ ENUM_OPERATORS() [2/2]

ENUM_OPERATORS ( ePaintSymmetryAreas ,
PAINT_SYMM_AREA_Z  )

◆ paint_calculate_rake_rotation()

◆ paint_grid_paint_mask()

float paint_grid_paint_mask ( const GridPaintMask * gpm,
uint level,
uint x,
uint y )

◆ paint_is_bmesh_face_hidden()

bool paint_is_bmesh_face_hidden ( const BMFace * f)

Return true if all vertices in the face are visible, false otherwise.

Definition at line 1951 of file paint.cc.

References BM_elem_flag_test, BM_ELEM_HIDDEN, BM_FACE_FIRST_LOOP, BMLoop::next, and BMLoop::v.

Referenced by blender::ed::sculpt_paint::hide::partialvis_update_bmesh_faces().

◆ paint_is_grid_face_hidden()

◆ paint_update_brush_rake_rotation()

Variable Documentation

◆ PAINT_CURSOR_PAINT_GREASE_PENCIL

const uchar PAINT_CURSOR_PAINT_GREASE_PENCIL[3]
extern

◆ PAINT_CURSOR_SCULPT

const uchar PAINT_CURSOR_SCULPT[3]
extern

Definition at line 243 of file paint.cc.

Referenced by blender::ed::sculpt_paint::object_sculpt_mode_enter().

◆ PAINT_CURSOR_SCULPT_CURVES

const uchar PAINT_CURSOR_SCULPT_CURVES[3]
extern

Definition at line 247 of file paint.cc.

Referenced by blender::ed::sculpt_paint::curves_sculptmode_enter().

◆ PAINT_CURSOR_SCULPT_GREASE_PENCIL

const uchar PAINT_CURSOR_SCULPT_GREASE_PENCIL[3]
extern

Definition at line 249 of file paint.cc.

Referenced by blender::ed::greasepencil::sculptmode_toggle_exec().

◆ PAINT_CURSOR_TEXTURE_PAINT

const uchar PAINT_CURSOR_TEXTURE_PAINT[3]
extern

Definition at line 246 of file paint.cc.

Referenced by ED_object_texture_paint_mode_enter_ex(), and ED_space_image_paint_update().

◆ PAINT_CURSOR_VERTEX_PAINT

const uchar PAINT_CURSOR_VERTEX_PAINT[3]
extern

Definition at line 244 of file paint.cc.

Referenced by blender::ed::sculpt_paint::vwpaint::mode_enter_generic().

◆ PAINT_CURSOR_WEIGHT_PAINT

const uchar PAINT_CURSOR_WEIGHT_PAINT[3]
extern

Definition at line 245 of file paint.cc.

Referenced by blender::ed::sculpt_paint::vwpaint::mode_enter_generic().