|
Blender V5.3
|
Public Member Functions | |
| PaintOperationExecutor (Scene &scene) | |
| void | process_start_sample (PaintOperation &self, const bContext &C, const InputSample &start_sample, const int material_index, const bool use_stroke, 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 273 of file editors/sculpt_paint/grease_pencil/paint.cc.
|
inline |
Definition at line 290 of file editors/sculpt_paint/grease_pencil/paint.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::BrushGpencilSettings::aspect_ratio, aspect_ratio_, blender::BKE_brush_color_get(), blender::BKE_brush_color_jitter_get_settings(), blender::BKE_paint_brush(), brush_, blender::ed::sculpt_paint::greasepencil::brush_using_vertex_color(), blender::copy_v3_v3(), fill_color_, blender::BrushGpencilSettings::flag, blender::BrushGpencilSettings::flag2, blender::GP_BRUSH_GROUP_RANDOM, blender::GP_BRUSH_USE_FILL, blender::GP_BRUSH_USE_STROKE, blender::ToolSettings::gp_paint, blender::Brush::gpencil_settings, blender::BrushGpencilSettings::hardness, jitter_settings_, blender::math::max(), blender::GpPaint::paint, scene_, settings_, softness_, blender::Scene::toolsettings, use_settings_random_, use_vertex_color_, vertex_color_, and blender::BrushGpencilSettings::vertex_factor.
|
inline |
Definition at line 635 of file editors/sculpt_paint/grease_pencil/paint.cc.
References blender::BKE_curvemapping_evaluateF(), blender::BLI_assert(), blender::BrushGpencilSettings::curve_jitter, blender::BrushGpencilSettings::draw_jitter, blender::BrushGpencilSettings::flag, blender::RandomNumberGenerator::get_float(), blender::GP_BRUSH_USE_JITTER_PRESSURE, blender::IndexRange::index_range(), blender::IndexRange::IndexRange(), blender::math::normalize(), blender::ed::greasepencil::DrawingPlacement::place(), blender::ed::greasepencil::DrawingPlacement::project(), settings_, blender::MutableSpan< T >::slice(), blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke(), and blender::ed::greasepencil::DrawingPlacement::use_project_to_surface().
Referenced by process_extension_sample().
|
inline |
Definition at line 556 of file editors/sculpt_paint/grease_pencil/paint.cc.
References blender::BrushGpencilSettings::active_smooth, 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(), settings_, blender::IndexRange::size(), and blender::Span< T >::size().
Referenced by process_extension_sample().
|
inline |
Definition at line 1020 of file editors/sculpt_paint/grease_pencil/paint.cc.
References C, blender::IndexRange::from_single(), blender::GP_TOOL_FLAG_PAINT_ONBACK, blender::ToolSettings::gpencil_flags, process_extension_sample(), scene_, blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::tag_topology_changed(), and blender::Scene::toolsettings.
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_extended().
|
inline |
Definition at line 679 of file editors/sculpt_paint/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(), blender::BLI_assert(), blender::BLI_time_now_seconds(), brush_, blender::ed::sculpt_paint::greasepencil::brush_radius_to_pixel_radius(), C, blender::bke::AttributeAccessor::contains(), blender::bke::MutableAttributeAccessor::convert_or_add_for_write_span(), blender::MutableSpan< T >::copy_from(), blender::math::cos(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), blender::bke::Curve, blender::math::distance(), blender::math::dot(), blender::BrushGpencilSettings::draw_angle, blender::BrushGpencilSettings::draw_angle_factor, blender::BrushGpencilSettings::draw_jitter, blender::BrushGpencilSettings::draw_random_press, blender::BrushGpencilSettings::draw_random_strength, blender::bke::fill_attribute_range_default(), blender::bke::SpanAttributeWriter< T >::finish(), blender::BrushGpencilSettings::flag, blender::BrushGpencilSettings::flag2, blender::math::floor(), blender::IndexRange::from_single(), blender::GP_BRUSH_DISSABLE_LASSO, blender::GP_BRUSH_USE_FILL, blender::ToolSettings::gp_paint, blender::GP_TOOL_FLAG_PAINT_ONBACK, blender::ToolSettings::gpencil_flags, blender::IndexRange::index_range(), blender::MutableSpan< T >::index_range(), blender::IndexRange::IndexRange(), 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::bke::greasepencil::Drawing::opacities(), blender::bke::greasepencil::Drawing::opacities_for_write(), blender::ed::greasepencil::opacity_from_input_sample(), blender::GpPaint::paint, blender::ed::greasepencil::DrawingPlacement::place(), blender::bke::Point, position, blender::ed::sculpt_paint::InputSample::pressure, blender::ed::greasepencil::DrawingPlacement::project(), blender::bke::greasepencil::Drawing::radii(), blender::bke::greasepencil::Drawing::radii_for_write(), 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(), scene_, blender::bke::greasepencil::Drawing::set_texture_matrices(), settings_, blender::math::sin(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), blender::Brush::spacing, blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes_for_write(), blender::ed::greasepencil::DrawingPlacement::to_world_space(), blender::Scene::toolsettings, blender::math::transform_point(), blender::ed::sculpt_paint::greasepencil::PaintOperation::update_stroke_depth_placement(), blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke(), blender::ed::greasepencil::DrawingPlacement::use_project_to_surface(), use_settings_random_, use_vertex_color_, blender::BrushGpencilSettings::uv_random, vertex_color_, blender::bke::greasepencil::Drawing::vertex_colors(), and blender::bke::greasepencil::Drawing::vertex_colors_for_write().
Referenced by execute().
|
inline |
Definition at line 315 of file editors/sculpt_paint/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::BrushGpencilSettings::caps_type, blender::bke::AttributeAccessor::contains(), blender::bke::MutableAttributeAccessor::convert_or_add_for_write_span(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), blender::bke::Curve, blender::CURVE_TYPE_POLY, blender::bke::fill_attribute_range_default(), fill_color_, blender::bke::greasepencil::Drawing::fill_colors_for_write(), blender::bke::SpanAttributeWriter< T >::finish(), blender::BrushGpencilSettings::flag, float, blender::IndexRange::from_single(), blender::ed::greasepencil::DrawingPlacement::get_depth(), blender::bke::greasepencil::get_next_available_fill_id(), blender::GP_BRUSH_DISSABLE_LASSO, blender::GP_BRUSH_USE_CYCLIC_STROKE, blender::ToolSettings::gp_paint, blender::GP_STROKE_CAP_TYPE_ROUND, blender::GP_TOOL_FLAG_PAINT_ONBACK, blender::ToolSettings::gpencil_flags, blender::IndexRange::IndexRange(), jitter_settings_, blender::IndexRange::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::ed::sculpt_paint::InputSample::mouse_position, blender::bke::greasepencil::Drawing::opacities_for_write(), blender::ed::greasepencil::opacity_from_input_sample(), blender::GpPaint::paint, blender::ed::greasepencil::DrawingPlacement::place(), blender::bke::Point, blender::ed::sculpt_paint::InputSample::pressure, blender::ed::greasepencil::DrawingPlacement::project(), blender::bke::greasepencil::Drawing::radii_for_write(), 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(), scene_, settings_, softness_, blender::bke::GSpanAttributeWriter::span, blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_topology_changed(), blender::ed::greasepencil::DrawingPlacement::to_world_space(), blender::Scene::toolsettings, blender::ed::sculpt_paint::greasepencil::PaintOperation::update_stroke_depth_placement(), blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke(), blender::ed::greasepencil::DrawingPlacement::use_project_to_surface(), use_vertex_color_, blender::BrushGpencilSettings::uv_random, vertex_color_, and blender::bke::greasepencil::Drawing::vertex_colors_for_write().
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin().
| float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::aspect_ratio_ |
Definition at line 285 of file editors/sculpt_paint/grease_pencil/paint.cc.
Referenced by PaintOperationExecutor(), and process_start_sample().
| Brush* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::brush_ |
Definition at line 277 of file editors/sculpt_paint/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 283 of file editors/sculpt_paint/grease_pencil/paint.cc.
Referenced by PaintOperationExecutor(), and process_start_sample().
| GreasePencil* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::grease_pencil_ |
Definition at line 275 of file editors/sculpt_paint/grease_pencil/paint.cc.
| std::optional<BrushColorJitterSettings> blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::jitter_settings_ |
Definition at line 280 of file editors/sculpt_paint/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 274 of file editors/sculpt_paint/grease_pencil/paint.cc.
Referenced by execute(), PaintOperationExecutor(), process_extension_sample(), and process_start_sample().
| BrushGpencilSettings* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::settings_ |
Definition at line 279 of file editors/sculpt_paint/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 284 of file editors/sculpt_paint/grease_pencil/paint.cc.
Referenced by PaintOperationExecutor(), and process_start_sample().
| bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_settings_random_ |
Definition at line 288 of file editors/sculpt_paint/grease_pencil/paint.cc.
Referenced by PaintOperationExecutor(), and process_extension_sample().
| bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_vertex_color_ |
Definition at line 287 of file editors/sculpt_paint/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 282 of file editors/sculpt_paint/grease_pencil/paint.cc.
Referenced by PaintOperationExecutor(), process_extension_sample(), and process_start_sample().