Blender V5.0
BKE_paint.hh File Reference
#include <variant>
#include "BLI_array.hh"
#include "BLI_bit_vector.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_offset_indices.hh"
#include "BLI_shared_cache.hh"
#include "BLI_utility_mixins.hh"
#include "BLI_vector.hh"
#include "DNA_brush_enums.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_enums.h"

Go to the source code of this file.

Classes

struct  SculptPoseIKChainPreview
struct  SculptVertexInfo
struct  SculptBoundaryPreview
struct  SculptFakeNeighbors
struct  SculptTopologyIslandCache
struct  PersistentMultiresData
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, BMVert *>

Enumerations

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 (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_color_set (PaletteColor *color, const float rgb[3])
void BKE_palette_color_sync_legacy (PaletteColor *color)
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)
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, bool ensure_brushes=true)
void BKE_paint_free (Paint *paint)
void BKE_paint_copy (const Paint *src, Paint *dst, int flag)
void BKE_paint_settings_foreach_mode (ToolSettings *ts, blender::FunctionRef< void(Paint *paint)> fn)
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< int > BKE_paint_get_brush_type_from_obmode (const Brush *brush, eObjectMode ob_mode)
std::optional< int > BKE_paint_get_brush_type_from_paintmode (const Brush *brush, 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 Paint *paint)
BrushBKE_paint_brush (Paint *paint)
const BrushBKE_paint_brush_for_read (const Paint *paint)
BrushBKE_paint_brush_from_essentials (Main *bmain, PaintMode paint_mode, const char *name)
bool BKE_paint_can_use_brush (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)
void BKE_paint_previous_asset_reference_set (Paint *paint, AssetWeakReference &&asset_weak_reference)
void BKE_paint_previous_asset_reference_clear (Paint *paint)
std::optional< AssetWeakReferenceBKE_paint_brush_type_default_reference (PaintMode paint_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, PaintMode paint_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])
blender::float3 seed_hsv_jitter ()
bool paint_calculate_rake_rotation (Paint &paint, const Brush &brush, const float mouse_pos[2], PaintMode paint_mode, bool stroke_has_started)
void paint_update_brush_rake_rotation (Paint &paint, const Brush &brush, float rotation)
void BKE_paint_stroke_get_average (const Paint *paint, const Object *ob, float stroke[3])
blender::float3 BKE_paint_randomize_color (const BrushColorJitterSettings &color_jitter, const blender::float3 &initial_hsv_jitter, const float distance, const float pressure, const blender::float3 &color)
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)
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_cavity_curves_ensure (Sculpt *sd)
CurveMappingBKE_sculpt_default_cavity_curve ()
CurveMappingBKE_paint_default_curve ()

Macro Definition Documentation

◆ PAINT_OVERRIDE_MASK

#define PAINT_OVERRIDE_MASK
Value:

Definition at line 97 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 106 of file BKE_paint.hh.

Referenced by SCULPT_get_vertex_symm_area().

◆ PAINT_SYMM_AREAS

#define PAINT_SYMM_AREAS   8

◆ SCULPT_FACE_SET_NONE

#define SCULPT_FACE_SET_NONE   0

Definition at line 324 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(), blender::ed::sculpt_paint::brushes::do_draw_face_sets_brush(), 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(), 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, BMVert *>

Definition at line 360 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 87 of file BKE_paint.hh.

◆ ePaintSymmetryAreas

Enumerator
PAINT_SYMM_AREA_X 
PAINT_SYMM_AREA_Y 
PAINT_SYMM_AREA_Z 

Definition at line 108 of file BKE_paint.hh.

Function Documentation

◆ BKE_object_sculpt_use_dyntopo()

bool BKE_object_sculpt_use_dyntopo ( const Object * object)

Definition at line 3063 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 1671 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 645 of file paint.cc.

References Paint::brush.

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(), blender::ed::sculpt_paint::brush_exit_tex(), brush_scale_size_exec(), blender::ed::sculpt_paint::brush_tool_get(), buttons_context_path_brush(), buttons_texture_users_from_context(), blender::ed::sculpt_paint::trim::calculate_depth(), blender::ed::transform::calculateCenterActive(), blender::ed::transform::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(), blender::ed::transform::flushTransPaintCurve(), blender::ed::sculpt_paint::GreasePencilFillOpData::from_context(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), 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(), blender::ed::transform::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(), 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_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(), 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_get_location_bvh(), blender::ed::sculpt_paint::stroke_get_location_bvh_ex(), 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::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on(), blender::ed::greasepencil::toggle_weight_tool_direction_exec(), 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 650 of file paint.cc.

References Paint::brush.

Referenced by blender::draw::overlay::MeshUVs::begin_sync(), 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_forces(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::boundary::do_boundary_brush(), blender::ed::sculpt_paint::brushes::do_clay_brush(), blender::ed::sculpt_paint::brushes::do_clay_strips_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::cloth::do_cloth_brush(), blender::ed::sculpt_paint::brushes::do_displacement_eraser_brush(), blender::ed::sculpt_paint::brushes::do_displacement_smear_brush(), blender::ed::sculpt_paint::brushes::do_draw_brush(), blender::ed::sculpt_paint::brushes::do_draw_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_draw_sharp_brush(), blender::ed::sculpt_paint::brushes::do_draw_vector_displacement_brush(), blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::brushes::do_enhance_details_brush(), blender::ed::sculpt_paint::brushes::do_grab_brush(), blender::ed::sculpt_paint::brushes::do_inflate_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::ed::sculpt_paint::brushes::do_mask_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::sculpt_paint::pose::do_pose_brush(), blender::ed::sculpt_paint::brushes::do_relax_face_sets_brush(), blender::ed::sculpt_paint::brushes::do_rotate_brush(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::ed::sculpt_paint::color::do_smear_brush(), blender::ed::sculpt_paint::brushes::do_smooth_brush(), blender::ed::sculpt_paint::brushes::do_smooth_mask_brush(), blender::ed::sculpt_paint::brushes::do_snake_hook_brush(), blender::ed::sculpt_paint::brushes::do_surface_smooth_brush(), blender::ed::sculpt_paint::do_symmetrical_brush_actions(), blender::ed::sculpt_paint::brushes::do_thumb_brush(), blender::ed::sculpt_paint::brushes::do_topology_relax_brush(), blender::ed::sculpt_paint::brushes::do_topology_slide_brush(), 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(), 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::brushes::offset_positions(), paint_and_tex_color_alpha_intern(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_draw_smooth_cursor(), 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(), blender::ed::sculpt_paint::sculpt_brush_stroke_cancel(), sculpt_brush_type_name(), blender::ed::sculpt_paint::cloth::sculpt_cloth_ensure_constraints_in_simulation_area(), 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,
PaintMode paint_mode,
const char * name )

◆ BKE_paint_brush_set() [1/2]

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

Version of BKE_paint_brush_set() that takes an asset reference instead of a brush, importing the brush if necessary.

Returns
False if unable to set the brush to the provided asset reference. True otherwise.

Definition at line 674 of file paint.cc.

References blender::bke::asset_edit_id_from_weak_reference(), blender::bke::asset_edit_id_is_editable(), blender::bke::asset_edit_weak_reference_from_id(), BKE_paint_can_use_brush(), BLI_assert, Paint::brush, Paint::brush_asset_reference, Brush::id, ID_BR, ID_IS_LINKED, and Main::is_locked_for_linking.

Referenced by BKE_paint_brushes_validate().

◆ 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 710 of file paint.cc.

References asset_reference_create_from_brush(), BKE_paint_can_use_brush(), BKE_paint_invalidate_overlay_all(), 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(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_off(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_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 ( PaintMode paint_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 1823 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_can_use_brush()

bool BKE_paint_can_use_brush ( 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 655 of file paint.cc.

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

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

◆ 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(), 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 )

◆ BKE_paint_curve_add()

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

Definition at line 1369 of file paint.cc.

References BKE_id_new(), and name.

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_default_curve()

◆ 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 1177 of file paint.cc.

References Paint::eraser_brush.

◆ BKE_paint_eraser_brush_from_essentials()

Brush * BKE_paint_eraser_brush_from_essentials ( Main * bmain,
PaintMode paint_mode,
const char * name )

◆ BKE_paint_eraser_brush_set()

bool BKE_paint_eraser_brush_set ( Paint * paint,
Brush * brush )

◆ 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 476 of file paint.cc.

References BKE_paint_get_active(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, 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_scale_size_exec(), blender::ed::sculpt_paint::brush_tool_get(), buttons_texture_users_from_context(), blender::ed::sculpt_paint::expand::cache_initial_config_set(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::ed::sculpt_paint::face_set::change_visibility_exec(), blender::ed::transform::createTransPaintCurveVerts(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::transform::flushTransPaintCurve(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_brush_settings(), 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(), blender::ed::transform::initTransInfo(), is_brush_related_tool(), 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::object::object_transfer_mode_invoke(), 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_bucket_fill(), 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_smooth_cursor(), blender::ed::sculpt_paint::image::ops::paint::paint_exec(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), paint_proj_new_stroke(), paint_sample_color(), 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::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(), 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(), blender::ed::sculpt_paint::sculpt_update_cache_variants(), blender::ed::sculpt_paint::set_pivot_position_exec(), stencil_control_invoke(), stencil_control_poll(), stencil_fit_image_aspect_exec(), stencil_reset_transform_exec(), blender::ed::sculpt_paint::stroke_get_location_bvh(), blender::ed::sculpt_paint::stroke_get_location_bvh_ex(), blender::ed::greasepencil::stroke_trim_execute(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_off(), blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on(), blender::ed::greasepencil::toggle_weight_tool_direction_exec(), blender::ed::greasepencil::toggle_weight_tool_direction_poll(), ui_do_but_COLOR(), view3d_orbit_calc_center(), 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 1375 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_previous_asset_reference_clear()

void BKE_paint_previous_asset_reference_clear ( Paint * paint)

◆ BKE_paint_previous_asset_reference_set()

void BKE_paint_previous_asset_reference_set ( Paint * paint,
AssetWeakReference && asset_weak_reference )

Definition at line 1111 of file paint.cc.

References Paint::runtime.

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

◆ BKE_paint_randomize_color()

◆ 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 1665 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_settings_foreach_mode()

◆ BKE_paint_stroke_get_average()

◆ BKE_paint_use_unified_color()

◆ BKE_paintmode_get_active_from_context()

PaintMode BKE_paintmode_get_active_from_context ( const bContext * C)

Definition at line 505 of file paint.cc.

References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_space_image(), GPencil, Invalid, Object::mode, SpaceImage::mode, 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, 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::paint_draw_smooth_cursor(), 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_exec(), 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::vwpaint::update_cache_variants(), 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 1410 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 1394 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_color_set()

void BKE_palette_color_set ( PaletteColor * color,
const float rgb[3] )

◆ BKE_palette_color_sync_legacy()

void BKE_palette_color_sync_legacy ( PaletteColor * color)

◆ BKE_palette_from_hash()

◆ BKE_palette_is_empty()

bool BKE_palette_is_empty ( const Palette * palette)

Definition at line 1440 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 1477 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 1574 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 1514 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 1551 of file paint.cc.

References palettecolor_compare_vhs().

Referenced by palette_sort_exec().

◆ BKE_sculpt_cavity_curves_ensure()

void BKE_sculpt_cavity_curves_ensure ( Sculpt * sd)

◆ BKE_sculpt_color_layer_create_if_needed()

◆ BKE_sculpt_default_cavity_curve()

◆ BKE_sculpt_mask_layers_ensure()

void BKE_sculpt_mask_layers_ensure ( Depsgraph * depsgraph,
Main * bmain,
Object * ob,
MultiresModifierData * mmd )

Ensures a mask layer exists. If depsgraph and bmain are non-null, a mask doesn't exist and the object has a multi-resolution modifier then the scene depsgraph will be evaluated to update the runtime subdivision data.

Note
always call before BKE_sculpt_update_object_for_edit.

Definition at line 2806 of file paint.cc.

References blender::bke::MutableAttributeAccessor::add(), BKE_scene_graph_evaluated_ensure(), CCG_grid_size(), CD_GRID_PAINT_MASK, CD_SET_DEFAULT, CustomData_add_layer(), CustomData_has_layer(), GridPaintMask::data, Object::data, DEG_id_tag_update(), depsgraph, blender::bke::mesh::face_corner_next(), blender::bke::mesh::face_corner_prev(), faces, float, i, Object::id, ID_RECALC_GEOMETRY, GridPaintMask::level, blender::bke::AttributeAccessor::lookup(), mask(), max_ii(), MEM_calloc_arrayN(), next, blender::bke::Point, MultiresModifierData::sculptlvl, IndexRange::size(), and blender::Span< T >::slice().

Referenced by blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::sculpt_paint::mask::init_mask_grids(), blender::ed::sculpt_paint::mask::init_operation(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::ed::sculpt_paint::mask::mask_from_boundary_exec(), blender::ed::sculpt_paint::mask::mask_from_cavity_exec(), blender::ed::object::modifier_add(), blender::ed::object::multires_subdivide_exec(), blender::ed::sculpt_paint::sculpt_brush_stroke_invoke(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), and blender::ed::sculpt_paint::mask::sculpt_mask_filter_exec().

◆ 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 2764 of file paint.cc.

References DEG_get_original(), 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 2797 of file paint.cc.

References BLI_assert, DEG_get_evaluated(), DEG_get_original(), 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::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(), 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(), and vertex_color_set_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  )

References 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 2140 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()

◆ seed_hsv_jitter()