Blender V4.3
sculpt_paint_color.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
#include "DNA_meshdata_types.h"
#include "BLI_color.hh"
#include "BLI_enumerable_thread_specific.hh"
#include "BLI_hash.h"
#include "BLI_math_color_blend.h"
#include "BLI_math_vector.hh"
#include "BLI_task.h"
#include "BLI_vector.hh"
#include "BKE_attribute.hh"
#include "BKE_brush.hh"
#include "BKE_colorband.hh"
#include "BKE_colortools.hh"
#include "BKE_mesh.hh"
#include "BKE_paint.hh"
#include "BKE_pbvh_api.hh"
#include "IMB_colormanagement.hh"
#include "mesh_brush_common.hh"
#include "sculpt_automask.hh"
#include "sculpt_color.hh"
#include "sculpt_intern.hh"
#include "sculpt_smooth.hh"
#include "IMB_imbuf.hh"
#include "bmesh.hh"
#include <cmath>
#include <cstdlib>

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::color::ColorPaintLocalData
 
struct  blender::ed::sculpt_paint::color::SampleWetPaintData
 

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::color
 

Functions

template<typename Func >
void blender::ed::sculpt_paint::color::to_static_color_type (const CPPType &type, const Func &func)
 
template<typename T >
float4 blender::ed::sculpt_paint::color::to_float (const T &src)
 
template<>
float4 blender::ed::sculpt_paint::color::to_float (const MLoopCol &src)
 
template<>
float4 blender::ed::sculpt_paint::color::to_float (const MPropCol &src)
 
template<typename T >
void blender::ed::sculpt_paint::color::from_float (const float4 &src, T &dst)
 
template<>
void blender::ed::sculpt_paint::color::from_float (const float4 &src, MLoopCol &dst)
 
template<>
void blender::ed::sculpt_paint::color::from_float (const float4 &src, MPropCol &dst)
 
template<typename T >
static 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)
 
template<typename T >
static 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)
 
float4 blender::ed::sculpt_paint::color::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)
 
void blender::ed::sculpt_paint::color::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)
 
void blender::ed::sculpt_paint::color::swap_gathered_colors (Span< int > indices, GMutableSpan color_attribute, MutableSpan< float4 > r_colors)
 
void blender::ed::sculpt_paint::color::gather_colors (GSpan color_attribute, Span< int > indices, MutableSpan< float4 > r_colors)
 
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)
 
bke::GAttributeReader blender::ed::sculpt_paint::color::active_color_attribute (const Mesh &mesh)
 
bke::GSpanAttributeWriter blender::ed::sculpt_paint::color::active_color_attribute_for_write (Mesh &mesh)
 
static 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 void blender::ed::sculpt_paint::color::do_paint_brush_task (const Scene &scene, 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 blender::ed::sculpt_paint::color::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)
 
void blender::ed::sculpt_paint::color::do_paint_brush (const Scene &scene, const Depsgraph &depsgraph, PaintModeSettings &paint_mode_settings, const Sculpt &sd, Object &ob, const IndexMask &node_mask, const IndexMask &texnode_mask)
 
static 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)
 
void blender::ed::sculpt_paint::color::do_smear_brush (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask)