|
Blender V5.0
|
Public Member Functions | |
| PaintOperationExecutor (const bContext &C) | |
| 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 | |
| Scene * | scene_ |
| GreasePencil * | grease_pencil_ |
| Brush * | brush_ |
| BrushGpencilSettings * | settings_ |
| std::optional< BrushColorJitterSettings > | jitter_settings_ |
| 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_ |
| float | aspect_ratio_ |
| bool | use_vertex_color_ |
| bool | use_settings_random_ |
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 267 of file grease_pencil_paint.cc.
|
inline |
Definition at line 284 of file grease_pencil_paint.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, aspect_ratio_, BKE_brush_color_jitter_get_settings(), BKE_paint_brush(), brush_, blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), C, copy_v3_v3(), CTX_data_scene(), ELEM, fill_color_, GP_BRUSH_GROUP_RANDOM, GPPAINT_MODE_BOTH, GPPAINT_MODE_FILL, GPPAINT_MODE_STROKE, jitter_settings_, blender::math::max(), scene_, settings_, softness_, use_settings_random_, use_vertex_color_, and vertex_color_.
|
inline |
Definition at line 612 of file grease_pencil_paint.cc.
References BKE_curvemapping_evaluateF(), BLI_assert, GP_BRUSH_USE_JITTER_PRESSURE, blender::IndexRange::index_range(), blender::math::normalize(), self, settings_, and blender::MutableSpan< T >::slice().
Referenced by process_extension_sample().
|
inline |
Definition at line 533 of file grease_pencil_paint.cc.
References blender::ed::sculpt_paint::greasepencil::arithmetic_mean(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::math::distance(), blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::VArray< T >::from_single(), blender::geometry::gaussian_blur_1D(), blender::IndexRange::index_range(), blender::ed::sculpt_paint::greasepencil::morph_points_to_curve(), blender::ed::greasepencil::polyline_detect_corners(), blender::ed::greasepencil::polyline_fit_curve(), blender::ed::sculpt_paint::greasepencil::sample_curve_2d(), self, settings_, blender::IndexRange::size(), and blender::Span< T >::size().
Referenced by process_extension_sample().
|
inline |
Definition at line 987 of file grease_pencil_paint.cc.
References C, CTX_data_scene(), blender::IndexRange::from_single(), GP_TOOL_FLAG_PAINT_ONBACK, ToolSettings::gpencil_flags, process_extension_sample(), self, and Scene::toolsettings.
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_extended().
|
inline |
Definition at line 656 of file grease_pencil_paint.cc.
References blender::math::abs(), active_jitter(), active_smoothing(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), angle(), blender::bke::attribute_filter_from_skip_ref(), BLI_assert, BLI_time_now_seconds(), brush_, blender::ed::sculpt_paint::greasepencil::brush_radius_to_pixel_radius(), C, blender::bke::AttributeAccessor::contains(), blender::MutableSpan< T >::copy_from(), blender::math::cos(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), blender::math::distance(), blender::math::dot(), blender::bke::fill_attribute_range_default(), blender::math::floor(), blender::IndexRange::from_single(), GP_TOOL_FLAG_PAINT_ONBACK, ToolSettings::gpencil_flags, i, blender::IndexRange::index_range(), blender::MutableSpan< T >::index_range(), blender::math::interpolate(), jitter_settings_, blender::IndexRange::last(), blender::ed::sculpt_paint::greasepencil::linear_interpolation(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::math::max(), blender::ed::sculpt_paint::InputSample::mouse_position, blender::math::normalize(), blender::ed::greasepencil::opacity_from_input_sample(), blender::bke::Point, blender::ed::sculpt_paint::InputSample::pressure, blender::ed::greasepencil::radius_from_input_sample(), blender::ed::greasepencil::randomize_color(), blender::ed::greasepencil::randomize_opacity(), blender::ed::greasepencil::randomize_radius(), blender::ed::greasepencil::randomize_rotation(), blender::ed::greasepencil::resize_single_curve(), self, settings_, blender::math::sin(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), Scene::toolsettings, blender::math::transform_point(), use_settings_random_, use_vertex_color_, and vertex_color_.
Referenced by execute().
|
inline |
Definition at line 309 of file grease_pencil_paint.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), blender::ed::greasepencil::add_single_curve(), aspect_ratio_, blender::bke::attribute_filter_from_skip_ref(), brush_, C, blender::bke::AttributeAccessor::contains(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), blender::bke::Curve, CURVE_TYPE_POLY, blender::bke::fill_attribute_range_default(), fill_color_, blender::bke::SpanAttributeWriter< T >::finish(), float, blender::VArray< T >::from_single(), GP_STROKE_CAP_TYPE_ROUND, GP_TOOL_FLAG_PAINT_ONBACK, ToolSettings::gpencil_flags, jitter_settings_, blender::IndexRange::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::ed::sculpt_paint::InputSample::mouse_position, blender::ed::greasepencil::opacity_from_input_sample(), blender::bke::Point, blender::ed::sculpt_paint::InputSample::pressure, blender::ed::greasepencil::radius_from_input_sample(), blender::ed::greasepencil::randomize_color(), blender::ed::greasepencil::randomize_opacity(), blender::ed::greasepencil::randomize_radius(), blender::ed::greasepencil::randomize_rotation(), self, settings_, softness_, blender::bke::GSpanAttributeWriter::span, blender::bke::SpanAttributeWriter< T >::span, Scene::toolsettings, use_vertex_color_, and vertex_color_.
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin().
| float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::aspect_ratio_ |
Definition at line 279 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), and process_start_sample().
| Brush* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::brush_ |
Definition at line 271 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), process_extension_sample(), and process_start_sample().
| ColorGeometry4f blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::fill_color_ = ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f) |
Definition at line 277 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), and process_start_sample().
| GreasePencil* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::grease_pencil_ |
Definition at line 269 of file grease_pencil_paint.cc.
| std::optional<BrushColorJitterSettings> blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::jitter_settings_ |
Definition at line 274 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), process_extension_sample(), and process_start_sample().
| Scene* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::scene_ |
Definition at line 268 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor().
| BrushGpencilSettings* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::settings_ |
Definition at line 273 of file grease_pencil_paint.cc.
Referenced by active_jitter(), active_smoothing(), PaintOperationExecutor(), process_extension_sample(), and process_start_sample().
| float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::softness_ |
Definition at line 278 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), and process_start_sample().
| bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_settings_random_ |
Definition at line 282 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), and process_extension_sample().
| bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_vertex_color_ |
Definition at line 281 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), process_extension_sample(), and process_start_sample().
| ColorGeometry4f blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::vertex_color_ = ColorGeometry4f(0.0f, 0.0f, 0.0f, 0.0f) |
Definition at line 276 of file grease_pencil_paint.cc.
Referenced by PaintOperationExecutor(), process_extension_sample(), and process_start_sample().