|
Blender
V2.93
|
#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_hash.h"#include "BLI_math.h"#include "BLI_math_color_blend.h"#include "BLI_task.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "BKE_brush.h"#include "BKE_colortools.h"#include "BKE_context.h"#include "BKE_mesh.h"#include "BKE_mesh_mapping.h"#include "BKE_object.h"#include "BKE_paint.h"#include "BKE_pbvh.h"#include "BKE_scene.h"#include "DEG_depsgraph.h"#include "IMB_colormanagement.h"#include "WM_api.h"#include "WM_message.h"#include "WM_toolsystem.h"#include "WM_types.h"#include "ED_object.h"#include "ED_screen.h"#include "ED_sculpt.h"#include "paint_intern.h"#include "sculpt_intern.h"#include "RNA_access.h"#include "RNA_define.h"#include "UI_interface.h"#include "IMB_imbuf.h"#include "bmesh.h"#include <math.h>#include <stdlib.h>Go to the source code of this file.
Classes | |
| struct | SampleWetPaintTLSData |
Typedefs | |
| typedef struct SampleWetPaintTLSData | SampleWetPaintTLSData |
Functions | |
| static void | do_color_smooth_task_cb_exec (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
| static void | do_paint_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
| static void | do_sample_wet_paint_task_cb (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
| static void | sample_wet_paint_reduce (const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk) |
| void | SCULPT_do_paint_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
| static void | do_smear_brush_task_cb_exec (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls) |
| static void | do_smear_store_prev_colors_task_cb_exec (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
| void | SCULPT_do_smear_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
| typedef struct SampleWetPaintTLSData SampleWetPaintTLSData |
|
static |
Definition at line 72 of file sculpt_paint_color.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, blend_color_interpolate_float(), BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, PBVHVertexIter::col, data, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::index, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, PBVHVertexIter::mvert, PBVHVertexIter::no, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_neighbor_color_average(), and sqrtf.
Referenced by SCULPT_do_paint_brush(), and SCULPT_do_smear_brush().
|
static |
Definition at line 113 of file sculpt_paint_color.c.
References Brush::alpha, BKE_brush_color_get(), BKE_brush_secondary_color_get(), BKE_pbvh_node_color_buffer_get(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, Brush::blend, blend_color_interpolate_float(), blend_color_mix_float(), BLI_hash_int_01(), BLI_task_parallel_thread_id(), StrokeCache::bstrength, SculptSession::cache, CLAMP4, PBVHVertexIter::co, PBVHVertexIter::col, SculptOrigVertData::col, PBVHColorBufferNode::color, copy_v3_v3(), data, StrokeCache::density, StrokeCache::density_seed, SculptBrushTest::dist, fabsf, fade(), MVert::flag, StrokeCache::flow, PBVHVertexIter::fno, PBVHVertexIter::i, IMB_blend_color_float(), IMB_colormanagement_srgb_to_scene_linear_v3(), PBVHVertexIter::index, StrokeCache::invert, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v4_v4fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, noise(), StrokeCache::paint_brush, SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, SculptSession::scene, SCULPT_brush_strength_factor(), SCULPT_brush_test_cube(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), sqrtf, Brush::tip_roundness, and StrokeCache::wet_mix.
Referenced by SCULPT_do_paint_brush().
|
static |
Definition at line 212 of file sculpt_paint_color.c.
References add_v4_v4(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, PBVHVertexIter::col, SampleWetPaintTLSData::color, data, SculptSession::pbvh, PBVH_ITER_UNIQUE, SculptBrushTest::radius, SculptBrushTest::radius_squared, SCULPT_brush_test_init_with_falloff_shape(), and SampleWetPaintTLSData::tot_samples.
Referenced by SCULPT_do_paint_brush().
|
static |
Definition at line 368 of file sculpt_paint_color.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, blend_color_interpolate_float(), blend_color_mix_float(), BLI_task_parallel_thread_id(), BRUSH_SMEAR_DEFORM_DRAG, BRUSH_SMEAR_DEFORM_EXPAND, BRUSH_SMEAR_DEFORM_PINCH, StrokeCache::bstrength, SculptSession::cache, clamp_f(), PBVHVertexIter::co, PBVHVertexIter::col, copy_v4_v4(), data, SculptBrushTest::dist, dot_v3v3(), fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::index, SculptVertexNeighborIter::index, StrokeCache::last_location, StrokeCache::location, PBVHVertexIter::mask, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), mul_v4_fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, normalize_v3_v3(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::prev_colors, SCULPT_brush_strength_factor(), SCULPT_brush_test_init_with_falloff_shape(), SCULPT_vertex_co_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, Brush::smear_deform_type, sqrtf, and sub_v3_v3v3().
Referenced by SCULPT_do_smear_brush().
|
static |
Definition at line 445 of file sculpt_paint_color.c.
References BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptSession::cache, copy_v4_v4(), data, PBVHVertexIter::index, SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::prev_colors, and SCULPT_vertex_color_get().
Referenced by SCULPT_do_smear_brush().
|
static |
Definition at line 239 of file sculpt_paint_color.c.
References add_v4_v4(), SampleWetPaintTLSData::color, and SampleWetPaintTLSData::tot_samples.
Referenced by SCULPT_do_paint_brush().
Definition at line 250 of file sculpt_paint_color.c.
References StrokeCache::alt_smooth, BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), blend_color_interpolate_float(), BLI_hash_int_01(), BLI_task_parallel_range(), SculptSession::cache, CLAMP4, SampleWetPaintTLSData::color, copy_v3_v3(), copy_v4_v4(), cross_v3_v3v3(), Brush::curve, data, StrokeCache::density_seed, do_color_smooth_task_cb_exec(), do_paint_brush_task_cb_ex(), do_sample_wet_paint_task_cb(), StrokeCache::first_time, TaskParallelSettings::func_reduce, StrokeCache::grab_delta_symmetry, invert_m4_m4(), is_finite_v4(), is_zero_m4(), StrokeCache::location, mul_m4_m4m4(), mul_v3_fl(), mul_v4_fl(), normalize_m4(), Sculpt::paint, StrokeCache::paint_brush, StrokeCache::radius, sample_wet_paint_reduce(), scale_m4_fl(), Object::sculpt, SCULPT_calc_area_normal(), SCULPT_stroke_is_first_brush_step(), SCULPT_stroke_is_first_brush_step_of_symmetry_pass(), SculptThreadedTaskData::sd, Brush::tip_roundness, Brush::tip_scale_x, SampleWetPaintTLSData::tot_samples, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, SculptSession::vcol, StrokeCache::wet_mix, StrokeCache::wet_mix_prev_color, StrokeCache::wet_persistence, and zero_v4().
Referenced by do_brush_action().
Definition at line 459 of file sculpt_paint_color.c.
References StrokeCache::alt_smooth, BKE_curvemapping_init(), BKE_paint_brush(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), SculptSession::cache, copy_v4_v4(), Brush::curve, data, do_color_smooth_task_cb_exec(), do_smear_brush_task_cb_exec(), do_smear_store_prev_colors_task_cb_exec(), MEM_callocN, Sculpt::paint, StrokeCache::prev_colors, Object::sculpt, SCULPT_stroke_is_first_brush_step(), SCULPT_vertex_color_get(), SCULPT_vertex_count_get(), and SculptSession::vcol.
Referenced by do_brush_action().