Blender V5.0
blender::ed::sculpt_paint::color Namespace Reference

Classes

struct  LocalData
struct  ColorPaintLocalData
struct  SampleWetPaintData

Enumerations

enum class  FilterType {
  Fill = 0 , Hue , Saturation , Value ,
  Brightness , Contrast , Red , Green ,
  Blue , Smooth
}

Functions

void swap_gathered_colors (Span< int > indices, GMutableSpan color_attribute, MutableSpan< float4 > r_colors)
void gather_colors (GSpan color_attribute, Span< int > indices, MutableSpan< float4 > r_colors)
void gather_colors_vert (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face_map, GSpan color_attribute, bke::AttrDomain color_domain, Span< int > verts, MutableSpan< float4 > r_colors)
void color_vert_set (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face_map, bke::AttrDomain color_domain, int vert, const float4 &color, GMutableSpan color_attribute)
float4 color_vert_get (OffsetIndices< int > faces, Span< int > corner_verts, GroupedSpan< int > vert_to_face_map, GSpan color_attribute, bke::AttrDomain color_domain, int vert)
bke::GAttributeReader active_color_attribute (const Mesh &mesh)
bke::GSpanAttributeWriter active_color_attribute_for_write (Mesh &mesh)
void do_paint_brush (const Depsgraph &depsgraph, PaintModeSettings &paint_mode_settings, const Sculpt &sd, Object &ob, const IndexMask &node_mask, const IndexMask &texnode_mask)
void do_smear_brush (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask)
static BLI_NOINLINE void clamp_factors (const MutableSpan< float > factors, const float min, const float max)
static void color_filter_task (const Depsgraph &depsgraph, Object &ob, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const MeshAttributeData &attribute_data, const FilterType mode, const float filter_strength, const float *filter_fill_color, const bke::pbvh::MeshNode &node, LocalData &tls, bke::GSpanAttributeWriter &color_attribute)
static void sculpt_color_presmooth_init (const Mesh &mesh, Object &object)
static void sculpt_color_filter_apply (bContext *C, wmOperator *op, Object &ob)
static void sculpt_color_filter_end (bContext *C, Object &ob)
static wmOperatorStatus sculpt_color_filter_modal (bContext *C, wmOperator *op, const wmEvent *event)
static int sculpt_color_filter_init (bContext *C, wmOperator *op)
static wmOperatorStatus sculpt_color_filter_exec (bContext *C, wmOperator *op)
static wmOperatorStatus sculpt_color_filter_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static std::string sculpt_color_filter_get_name (wmOperatorType *, PointerRNA *ptr)
static void sculpt_color_filter_ui (bContext *, wmOperator *op)
void SCULPT_OT_color_filter (wmOperatorType *ot)
static void calc_local_positions (const float4x4 &mat, const Span< int > verts, const Span< float3 > positions, const MutableSpan< float3 > local_positions)
template<typename Func>
void to_static_color_type (const CPPType &type, const Func &func)
template<typename T>
float4 to_float (const T &src)
template<>
float4 to_float (const MLoopCol &src)
template<>
float4 to_float (const MPropCol &src)
template<typename T>
void from_float (const float4 &src, T &dst)
template<>
void from_float (const float4 &src, MLoopCol &dst)
template<>
void from_float (const float4 &src, MPropCol &dst)
template<typename T>
static float4 color_vert_get (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const GSpan color_attribute, const bke::AttrDomain color_domain, const int vert)
template<typename T>
static void color_vert_set (const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const GMutableSpan color_attribute, const bke::AttrDomain color_domain, const int vert, const float4 &color)
static void do_color_smooth_task (const Depsgraph &depsgraph, const Object &object, const Span< float3 > vert_positions, const Span< float3 > vert_normals, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const MeshAttributeData &attribute_data, const Brush &brush, const bke::pbvh::MeshNode &node, ColorPaintLocalData &tls, bke::GSpanAttributeWriter &color_attribute)
static void do_paint_brush_task (const Depsgraph &depsgraph, Object &object, const Span< float3 > vert_positions, const Span< float3 > vert_normals, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const MeshAttributeData &attribute_data, const Paint &paint, const Brush &brush, const float4x4 &mat, const float4 wet_mix_sampled_color, bke::pbvh::MeshNode &node, ColorPaintLocalData &tls, const MutableSpan< float4 > mix_colors, bke::GSpanAttributeWriter &color_attribute)
static void do_sample_wet_paint_task (const Object &object, const Span< float3 > vert_positions, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_vert, const GSpan color_attribute, const bke::AttrDomain color_domain, const Brush &brush, const bke::pbvh::MeshNode &node, ColorPaintLocalData &tls, SampleWetPaintData &swptd)
static void do_smear_brush_task (const Depsgraph &depsgraph, Object &object, const Span< float3 > vert_positions, const Span< float3 > vert_normals, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const MeshAttributeData &attribute_data, const Brush &brush, bke::pbvh::MeshNode &node, ColorPaintLocalData &tls, bke::GSpanAttributeWriter &color_attribute)

Variables

static const float fill_filter_default_color [4] = {1.0f, 1.0f, 1.0f, 1.0f}
static EnumPropertyItem prop_color_filter_types []

Enumeration Type Documentation

◆ FilterType

Enumerator
Fill 
Hue 
Saturation 
Value 
Brightness 
Contrast 
Red 
Green 
Blue 
Smooth 

Definition at line 50 of file sculpt_filter_color.cc.

Function Documentation

◆ active_color_attribute()

◆ active_color_attribute_for_write()

◆ calc_local_positions()

void blender::ed::sculpt_paint::color::calc_local_positions ( const float4x4 & mat,
const Span< int > verts,
const Span< float3 > positions,
const MutableSpan< float3 > local_positions )
static

Definition at line 43 of file sculpt_paint_color.cc.

References i, blender::math::transform_point(), and verts.

Referenced by do_paint_brush_task().

◆ clamp_factors()

BLI_NOINLINE void blender::ed::sculpt_paint::color::clamp_factors ( const MutableSpan< float > factors,
const float min,
const float max )
static

Definition at line 88 of file sculpt_filter_color.cc.

References BLI_NOINLINE, max, and min.

Referenced by color_filter_task().

◆ color_filter_task()

void blender::ed::sculpt_paint::color::color_filter_task ( const Depsgraph & depsgraph,
Object & ob,
const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face_map,
const MeshAttributeData & attribute_data,
const FilterType mode,
const float filter_strength,
const float * filter_fill_color,
const bke::pbvh::MeshNode & node,
LocalData & tls,
bke::GSpanAttributeWriter & color_attribute )
static

Definition at line 97 of file sculpt_filter_color.cc.

References blender::ed::sculpt_paint::filter::Cache::automasking, blender::ed::sculpt_paint::color::LocalData::average_colors, blend_color_interpolate_float(), blend_color_mix_float(), Blue, Brightness, blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::ed::sculpt_paint::calc_vert_neighbors(), blender::math::clamp(), clamp_factors(), color_vert_get(), color_vert_set(), blender::ed::sculpt_paint::color::LocalData::colors, Contrast, copy_v3_v3(), copy_v4_v4(), depsgraph, blender::bke::GSpanAttributeWriter::domain, fabs(), faces, blender::ed::sculpt_paint::color::LocalData::factors, Fill, blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), SculptSession::filter_cache, fmod(), Green, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, hsv_to_rgb_v(), Hue, i, interp_v4_v4v4(), madd_v4_v4fl(), blender::ed::sculpt_paint::MeshAttributeData::mask, mul_v4_fl(), blender::ed::sculpt_paint::smooth::neighbor_color_average(), blender::ed::sculpt_paint::color::LocalData::neighbor_data, blender::ed::sculpt_paint::color::LocalData::neighbor_offsets, blender::ed::sculpt_paint::color::LocalData::new_colors, blender::ed::sculpt_paint::orig_color_data_get_mesh(), blender::ed::sculpt_paint::filter::Cache::pre_smoothed_color, Red, Vector< T, InlineBufferCapacity, Allocator >::resize(), rgb_to_hsv_v(), Saturation, blender::ed::sculpt_paint::scale_factors(), Object::sculpt, Smooth, blender::bke::GSpanAttributeWriter::span, Value, blender::bke::pbvh::MeshNode::verts(), and verts.

Referenced by sculpt_color_filter_apply().

◆ color_vert_get() [1/2]

template<typename T>
float4 blender::ed::sculpt_paint::color::color_vert_get ( const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face_map,
const GSpan color_attribute,
const bke::AttrDomain color_domain,
const int vert )
static

◆ color_vert_get() [2/2]

◆ color_vert_set() [1/2]

template<typename T>
void blender::ed::sculpt_paint::color::color_vert_set ( const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face_map,
const GMutableSpan color_attribute,
const bke::AttrDomain color_domain,
const int vert,
const float4 & color )
static

◆ color_vert_set() [2/2]

◆ do_color_smooth_task()

void blender::ed::sculpt_paint::color::do_color_smooth_task ( const Depsgraph & depsgraph,
const Object & object,
const Span< float3 > vert_positions,
const Span< float3 > vert_normals,
const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face_map,
const MeshAttributeData & attribute_data,
const Brush & brush,
const bke::pbvh::MeshNode & node,
ColorPaintLocalData & tls,
bke::GSpanAttributeWriter & color_attribute )
static

Definition at line 269 of file sculpt_paint_color.cc.

References blender::ed::sculpt_paint::apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blend_color_interpolate_float(), BRUSH_FRONTFACE, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_strength_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::ed::sculpt_paint::calc_vert_neighbors(), color_vert_get(), color_vert_set(), blender::ed::sculpt_paint::color::ColorPaintLocalData::colors, depsgraph, blender::ed::sculpt_paint::color::ColorPaintLocalData::distances, do_color_smooth_task(), blender::bke::GSpanAttributeWriter::domain, faces, blender::ed::sculpt_paint::color::ColorPaintLocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::filter_distances_with_radius(), blender::ed::sculpt_paint::filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::MeshAttributeData::hide_poly, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, i, blender::MutableSpan< T >::index_range(), blender::ed::sculpt_paint::MeshAttributeData::mask, blender::ed::sculpt_paint::smooth::neighbor_color_average(), blender::ed::sculpt_paint::color::ColorPaintLocalData::neighbor_data, blender::ed::sculpt_paint::color::ColorPaintLocalData::neighbor_offsets, blender::ed::sculpt_paint::color::ColorPaintLocalData::new_colors, blender::ed::sculpt_paint::StrokeCache::radius, Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::bke::GSpanAttributeWriter::span, blender::bke::pbvh::MeshNode::verts(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.

Referenced by do_color_smooth_task(), and do_paint_brush().

◆ do_paint_brush()

void blender::ed::sculpt_paint::color::do_paint_brush ( const Depsgraph & depsgraph,
PaintModeSettings & paint_mode_settings,
const Sculpt & sd,
Object & ob,
const IndexMask & node_mask,
const IndexMask & texnode_mask )

Definition at line 555 of file sculpt_paint_color.cc.

References active_color_attribute_for_write(), blender::ed::sculpt_paint::StrokeCache::alt_smooth, b, BKE_curvemapping_init(), BKE_paint_brush_for_read(), blend_color_interpolate_float(), BLI_hash_int_01(), SculptSession::cache, blender::math::clamp(), blender::ed::sculpt_paint::color::SampleWetPaintData::color, Brush::curve_distance_falloff, Object::data, blender::ed::sculpt_paint::StrokeCache::density_seed, depsgraph, do_color_smooth_task(), do_paint_brush(), faces, blender::bke::GSpanAttributeWriter::finish(), blender::ed::sculpt_paint::StrokeCache::first_time, blender::index_mask::IndexMask::foreach_index(), i, blender::index_mask::IndexMask::index_range(), is_finite_v4(), is_zero_m4(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::bke::pbvh::Tree::nodes(), Sculpt::paint, blender::ed::sculpt_paint::StrokeCache::paint_brush, blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), Object::sculpt, SCULPT_cube_tip_init(), SCULPT_do_paint_brush_image(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SCULPT_use_image_paint_brush(), blender::bke::pbvh::Tree::tag_attribute_changed(), Brush::tip_roundness, blender::ed::sculpt_paint::color::SampleWetPaintData::tot_samples, blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), blender::ed::sculpt_paint::StrokeCache::wet_mix, blender::ed::sculpt_paint::StrokeCache::wet_mix_prev_color, and blender::ed::sculpt_paint::StrokeCache::wet_persistence.

Referenced by blender::ed::sculpt_paint::do_brush_action(), and do_paint_brush().

◆ do_paint_brush_task()

void blender::ed::sculpt_paint::color::do_paint_brush_task ( const Depsgraph & depsgraph,
Object & object,
const Span< float3 > vert_positions,
const Span< float3 > vert_normals,
const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face_map,
const MeshAttributeData & attribute_data,
const Paint & paint,
const Brush & brush,
const float4x4 & mat,
const float4 wet_mix_sampled_color,
bke::pbvh::MeshNode & node,
ColorPaintLocalData & tls,
const MutableSpan< float4 > mix_colors,
bke::GSpanAttributeWriter & color_attribute )
static

Definition at line 352 of file sculpt_paint_color.cc.

References blender::ed::sculpt_paint::apply_hardness_to_distances(), blender::MutableSpan< T >::as_span(), blender::ed::sculpt_paint::color::ColorPaintLocalData::auto_mask, blender::ed::sculpt_paint::StrokeCache::automasking, BKE_brush_alpha_get(), BKE_brush_calc_curve_factors(), BKE_brush_color_get(), BKE_brush_color_jitter_get_settings(), BKE_brush_secondary_color_get(), BKE_colorband_evaluate(), BKE_paint_randomize_color(), Brush::blend, blend_color_interpolate_float(), blend_color_mix_float(), BLI_assert, BLI_hash_int_01(), BRUSH_FRONTFACE, BRUSH_GRADIENT_PRESSURE, BRUSH_GRADIENT_SPACING_CLAMP, BRUSH_GRADIENT_SPACING_REPEAT, BRUSH_USE_GRADIENT, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_cube_distances(), blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_texture_factors(), blender::ed::sculpt_paint::calc_front_face(), calc_local_positions(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), blender::math::clamp(), color_vert_get(), color_vert_set(), Brush::curve_distance_falloff, Brush::curve_distance_falloff_preset, blender::ed::sculpt_paint::StrokeCache::density, blender::ed::sculpt_paint::StrokeCache::density_seed, depsgraph, blender::ed::sculpt_paint::color::ColorPaintLocalData::distances, do_paint_brush_task(), blender::bke::GSpanAttributeWriter::domain, fabsf, faces, blender::ed::sculpt_paint::color::ColorPaintLocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::filter_distances_with_radius(), blender::ed::sculpt_paint::filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::StrokeCache::flow, fmod(), blender::ed::sculpt_paint::gather_data_mesh(), Brush::gradient, Brush::gradient_spacing, Brush::gradient_stroke_mode, blender::ed::sculpt_paint::StrokeCache::hardness, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, i, IMB_blend_color_float(), blender::ed::sculpt_paint::StrokeCache::initial_hsv_jitter, blender::ed::sculpt_paint::StrokeCache::invert, blender::ed::sculpt_paint::MeshAttributeData::mask, blender::ed::sculpt_paint::color::ColorPaintLocalData::mix_colors, blender::ed::sculpt_paint::color::ColorPaintLocalData::new_colors, blender::ed::sculpt_paint::orig_color_data_get_mesh(), blender::ed::sculpt_paint::StrokeCache::paint_brush, blender::ed::sculpt_paint::color::ColorPaintLocalData::positions, blender::ed::sculpt_paint::StrokeCache::pressure, blender::ed::sculpt_paint::StrokeCache::radius, Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), blender::ed::sculpt_paint::scatter_data_mesh(), seed, blender::bke::GSpanAttributeWriter::span, blender::ed::sculpt_paint::StrokeCache::stroke_distance, Brush::tip_roundness, blender::bke::pbvh::MeshNode::verts(), verts, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and blender::ed::sculpt_paint::StrokeCache::wet_mix.

Referenced by do_paint_brush_task().

◆ do_sample_wet_paint_task()

◆ do_smear_brush()

◆ do_smear_brush_task()

void blender::ed::sculpt_paint::color::do_smear_brush_task ( const Depsgraph & depsgraph,
Object & object,
const Span< float3 > vert_positions,
const Span< float3 > vert_normals,
const OffsetIndices< int > faces,
const Span< int > corner_verts,
const GroupedSpan< int > vert_to_face_map,
const MeshAttributeData & attribute_data,
const Brush & brush,
bke::pbvh::MeshNode & node,
ColorPaintLocalData & tls,
bke::GSpanAttributeWriter & color_attribute )
static

Definition at line 705 of file sculpt_paint_color.cc.

References blender::ed::sculpt_paint::apply_hardness_to_distances(), blender::ed::sculpt_paint::StrokeCache::automasking, blend_color_interpolate_float(), BRUSH_ANCHORED, BRUSH_FRONTFACE, BRUSH_SMEAR_DEFORM_DRAG, BRUSH_SMEAR_DEFORM_EXPAND, BRUSH_SMEAR_DEFORM_PINCH, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_strength_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::auto_mask::calc_vert_factors(), col, color_vert_get(), color_vert_set(), depsgraph, blender::math::distance(), blender::ed::sculpt_paint::color::ColorPaintLocalData::distances, do_smear_brush_task(), blender::bke::GSpanAttributeWriter::domain, blender::math::dot(), fabsf, faces, blender::ed::sculpt_paint::color::ColorPaintLocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::filter_distances_with_radius(), blender::ed::sculpt_paint::filter_region_clip_factors(), Brush::flag, blender::ed::sculpt_paint::StrokeCache::grab_delta_symm, blender::ed::sculpt_paint::MeshAttributeData::hide_poly, blender::ed::sculpt_paint::MeshAttributeData::hide_vert, i, blender::ed::sculpt_paint::StrokeCache::last_location_symm, len, blender::math::length(), blender::ed::sculpt_paint::StrokeCache::location_symm, blender::ed::sculpt_paint::MeshAttributeData::mask, blender::math::normalize(), blender::ed::sculpt_paint::StrokeCache::paint_brush, blender::ed::sculpt_paint::StrokeCache::prev_colors, blender::ed::sculpt_paint::StrokeCache::radius, Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::scale_factors(), Brush::smear_deform_type, blender::bke::GSpanAttributeWriter::span, blender::ed::sculpt_paint::vert_neighbors_get_mesh(), blender::bke::pbvh::MeshNode::verts(), verts, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, and w().

Referenced by do_smear_brush_task().

◆ from_float() [1/3]

template<>
void blender::ed::sculpt_paint::color::from_float ( const float4 & src,
MLoopCol & dst )

Definition at line 79 of file sculpt_paint_color.cc.

References linearrgb_to_srgb_v3_v3(), and rgba_float_to_uchar().

◆ from_float() [2/3]

template<>
void blender::ed::sculpt_paint::color::from_float ( const float4 & src,
MPropCol & dst )

Definition at line 86 of file sculpt_paint_color.cc.

References MPropCol::color, and copy_v4_v4().

◆ from_float() [3/3]

template<typename T>
void blender::ed::sculpt_paint::color::from_float ( const float4 & src,
T & dst )

References T.

Referenced by color_vert_set().

◆ gather_colors()

void blender::ed::sculpt_paint::color::gather_colors ( GSpan color_attribute,
Span< int > indices,
MutableSpan< float4 > r_colors )

◆ gather_colors_vert()

void blender::ed::sculpt_paint::color::gather_colors_vert ( OffsetIndices< int > faces,
Span< int > corner_verts,
GroupedSpan< int > vert_to_face_map,
GSpan color_attribute,
bke::AttrDomain color_domain,
Span< int > verts,
MutableSpan< float4 > r_colors )

◆ sculpt_color_filter_apply()

◆ sculpt_color_filter_end()

◆ sculpt_color_filter_exec()

wmOperatorStatus blender::ed::sculpt_paint::color::sculpt_color_filter_exec ( bContext * C,
wmOperator * op )
static

◆ sculpt_color_filter_get_name()

std::string blender::ed::sculpt_paint::color::sculpt_color_filter_get_name ( wmOperatorType * ,
PointerRNA * ptr )
static

◆ sculpt_color_filter_init()

◆ sculpt_color_filter_invoke()

◆ sculpt_color_filter_modal()

◆ sculpt_color_filter_ui()

void blender::ed::sculpt_paint::color::sculpt_color_filter_ui ( bContext * ,
wmOperator * op )
static

◆ sculpt_color_presmooth_init()

◆ SCULPT_OT_color_filter()

◆ swap_gathered_colors()

void blender::ed::sculpt_paint::color::swap_gathered_colors ( Span< int > indices,
GMutableSpan color_attribute,
MutableSpan< float4 > r_colors )

◆ to_float() [1/3]

template<>
float4 blender::ed::sculpt_paint::color::to_float ( const MLoopCol & src)

Definition at line 65 of file sculpt_paint_color.cc.

References rgba_uchar_to_float(), and srgb_to_linearrgb_v3_v3().

◆ to_float() [2/3]

template<>
float4 blender::ed::sculpt_paint::color::to_float ( const MPropCol & src)

Definition at line 72 of file sculpt_paint_color.cc.

References MPropCol::color.

◆ to_float() [3/3]

template<typename T>
float4 blender::ed::sculpt_paint::color::to_float ( const T & src)

References T.

Referenced by color_vert_get().

◆ to_static_color_type()

template<typename Func>
void blender::ed::sculpt_paint::color::to_static_color_type ( const CPPType & type,
const Func & func )
inline

Definition at line 53 of file sculpt_paint_color.cc.

References blender::CPPType::is().

Referenced by color_vert_get(), color_vert_set(), and swap_gathered_colors().

Variable Documentation

◆ fill_filter_default_color

const float blender::ed::sculpt_paint::color::fill_filter_default_color[4] = {1.0f, 1.0f, 1.0f, 1.0f}
static

Definition at line 63 of file sculpt_filter_color.cc.

Referenced by SCULPT_OT_color_filter().

◆ prop_color_filter_types

EnumPropertyItem blender::ed::sculpt_paint::color::prop_color_filter_types[]
static
Initial value:
= {
{int(FilterType::Fill), "FILL", 0, "Fill", "Fill with a specific color"},
{int(FilterType::Hue), "HUE", 0, "Hue", "Change hue"},
{int(FilterType::Saturation), "SATURATION", 0, "Saturation", "Change saturation"},
{int(FilterType::Value), "VALUE", 0, "Value", "Change value"},
{int(FilterType::Brightness), "BRIGHTNESS", 0, "Brightness", "Change brightness"},
{int(FilterType::Contrast), "CONTRAST", 0, "Contrast", "Change contrast"},
{int(FilterType::Smooth), "SMOOTH", 0, "Smooth", "Smooth colors"},
{int(FilterType::Red), "RED", 0, "Red", "Change red channel"},
{int(FilterType::Green), "GREEN", 0, "Green", "Change green channel"},
{int(FilterType::Blue), "BLUE", 0, "Blue", "Change blue channel"},
{0, nullptr, 0, nullptr, nullptr},
}

Definition at line 65 of file sculpt_filter_color.cc.

Referenced by SCULPT_OT_color_filter().