Blender V4.3
blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor Struct Reference

Public Member Functions

 PaintOperationExecutor (const bContext &C)
 
float randomize_radius (PaintOperation &self, const float distance, const float radius, const float pressure)
 
float randomize_opacity (PaintOperation &self, const float distance, const float opacity, const float pressure)
 
float randomize_rotation (PaintOperation &self, const float pressure)
 
ColorGeometry4f randomize_color (PaintOperation &self, const float distance, const ColorGeometry4f color, const float pressure)
 
void process_start_sample (PaintOperation &self, const bContext &C, const InputSample &start_sample, const int material_index, const bool use_fill)
 
void active_smoothing (PaintOperation &self, const IndexRange smooth_window)
 
void active_jitter (PaintOperation &self, const int new_points_num, const float brush_radius_px, const float pressure, const IndexRange active_window, MutableSpan< float3 > curve_positions)
 
void process_extension_sample (PaintOperation &self, const bContext &C, const InputSample &extension_sample)
 
void execute (PaintOperation &self, const bContext &C, const InputSample &extension_sample)
 

Public Attributes

Scenescene_
 
GreasePencilgrease_pencil_
 
Brushbrush_
 
BrushGpencilSettingssettings_
 
ColorGeometry4f vertex_color_ = ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f)
 
ColorGeometry4f fill_color_ = ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f)
 
float softness_
 
bool use_vertex_color_
 
bool use_settings_random_
 
bke::greasepencil::Drawingdrawing_
 

Detailed Description

Utility class that actually executes the update when the stroke is updated. That's useful because it avoids passing a very large number of parameters between functions.

Definition at line 283 of file grease_pencil_paint.cc.

Constructor & Destructor Documentation

◆ PaintOperationExecutor()

Member Function Documentation

◆ active_jitter()

void blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::active_jitter ( PaintOperation & self,
const int new_points_num,
const float brush_radius_px,
const float pressure,
const IndexRange active_window,
MutableSpan< float3 > curve_positions )
inline

◆ active_smoothing()

◆ execute()

◆ process_extension_sample()

void blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample ( PaintOperation & self,
const bContext & C,
const InputSample & extension_sample )
inline

Definition at line 732 of file grease_pencil_paint.cc.

References blender::math::abs(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), BLI_time_now_seconds(), blender::ed::sculpt_paint::greasepencil::brush_radius_to_pixel_radius(), blender::MutableSpan< T >::copy_from(), blender::math::cos(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), blender::math::distance(), blender::math::dot(), BrushGpencilSettings::draw_angle, BrushGpencilSettings::draw_angle_factor, BrushGpencilSettings::draw_jitter, BrushGpencilSettings::draw_random_press, BrushGpencilSettings::draw_random_strength, blender::IndexRange::drop_front(), blender::ed::sculpt_paint::greasepencil::extend_curve(), blender::bke::SpanAttributeWriter< T >::finish(), blender::math::floor(), GP_TOOL_FLAG_PAINT_ONBACK, blender::IndexRange::index_range(), blender::math::interpolate(), blender::IndexRange::last(), blender::math::max(), blender::ed::sculpt_paint::InputSample::mouse_position, blender::math::normalize(), blender::bke::greasepencil::Drawing::opacities(), blender::bke::greasepencil::Drawing::opacities_for_write(), blender::ed::sculpt_paint::InputSample::pressure, blender::bke::greasepencil::Drawing::radii(), blender::bke::greasepencil::Drawing::radii_for_write(), self, blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::math::sin(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), Brush::spacing, blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes_for_write(), blender::IndexRange::take_back(), blender::math::transform_point(), BrushGpencilSettings::uv_random, blender::bke::greasepencil::Drawing::vertex_colors(), and blender::bke::greasepencil::Drawing::vertex_colors_for_write().

◆ process_start_sample()

◆ randomize_color()

◆ randomize_opacity()

float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::randomize_opacity ( PaintOperation & self,
const float distance,
const float opacity,
const float pressure )
inline

◆ randomize_radius()

float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::randomize_radius ( PaintOperation & self,
const float distance,
const float radius,
const float pressure )
inline

◆ randomize_rotation()

float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::randomize_rotation ( PaintOperation & self,
const float pressure )
inline

Member Data Documentation

◆ brush_

Brush* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::brush_

Definition at line 287 of file grease_pencil_paint.cc.

◆ drawing_

bke::greasepencil::Drawing* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::drawing_

Definition at line 297 of file grease_pencil_paint.cc.

◆ fill_color_

ColorGeometry4f blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::fill_color_ = ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f)

Definition at line 291 of file grease_pencil_paint.cc.

◆ grease_pencil_

GreasePencil* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::grease_pencil_

Definition at line 285 of file grease_pencil_paint.cc.

◆ scene_

Scene* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::scene_

Definition at line 284 of file grease_pencil_paint.cc.

◆ settings_

BrushGpencilSettings* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::settings_

Definition at line 289 of file grease_pencil_paint.cc.

◆ softness_

float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::softness_

Definition at line 292 of file grease_pencil_paint.cc.

◆ use_settings_random_

bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_settings_random_

Definition at line 295 of file grease_pencil_paint.cc.

◆ use_vertex_color_

bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_vertex_color_

Definition at line 294 of file grease_pencil_paint.cc.

◆ vertex_color_

ColorGeometry4f blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::vertex_color_ = ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f)

Definition at line 290 of file grease_pencil_paint.cc.


The documentation for this struct was generated from the following file: