|
Blender V4.3
|
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 | |
| Scene * | scene_ |
| GreasePencil * | grease_pencil_ |
| Brush * | brush_ |
| BrushGpencilSettings * | 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_ |
| bool | use_vertex_color_ |
| bool | use_settings_random_ |
| bke::greasepencil::Drawing * | drawing_ |
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.
|
inline |
Definition at line 299 of file grease_pencil_paint.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, BKE_paint_brush(), BLI_assert, RenderData::cfra, CTX_data_active_object(), CTX_data_scene(), ELEM, BrushGpencilSettings::flag, GP_BRUSH_GROUP_RANDOM, ToolSettings::gp_paint, Brush::gpencil_settings, GPPAINT_FLAG_USE_VERTEXCOLOR, GPPAINT_MODE_BOTH, GPPAINT_MODE_FILL, GPPAINT_MODE_STROKE, BrushGpencilSettings::hardness, GpPaint::mode, GpPaint::paint, Scene::r, Brush::rgb, srgb_to_linearrgb_v3_v3(), Scene::toolsettings, BrushGpencilSettings::vertex_factor, and BrushGpencilSettings::vertex_mode.
|
inline |
Definition at line 701 of file grease_pencil_paint.cc.
References BKE_curvemapping_evaluateF(), BrushGpencilSettings::curve_jitter, BrushGpencilSettings::draw_jitter, BrushGpencilSettings::flag, GP_BRUSH_USE_JITTER_PRESSURE, blender::IndexRange::index_range(), blender::math::normalize(), self, blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
|
inline |
Definition at line 622 of file grease_pencil_paint.cc.
References 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::IndexRange::index_range(), blender::ed::sculpt_paint::greasepencil::morph_points_to_curve(), blender::ed::sculpt_paint::greasepencil::sample_curve_2d(), self, blender::IndexRange::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
|
inline |
Definition at line 981 of file grease_pencil_paint.cc.
References CTX_data_scene(), blender::bke::CurvesGeometry::curves_range(), blender::IndexRange::first(), GP_TOOL_FLAG_PAINT_ONBACK, self, blender::bke::greasepencil::Drawing::strokes(), and blender::bke::greasepencil::Drawing::tag_topology_changed().
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_extended().
|
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().
|
inline |
Definition at line 473 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(), BrushGpencilSettings::caps_type, blender::ed::sculpt_paint::greasepencil::create_blank_curve(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), CURVE_TYPE_POLY, blender::bke::greasepencil::Drawing::fill_colors_for_write(), blender::bke::SpanAttributeWriter< T >::finish(), float, GP_STROKE_CAP_TYPE_ROUND, GP_TOOL_FLAG_PAINT_ONBACK, blender::IndexRange::last(), blender::ed::sculpt_paint::InputSample::mouse_position, blender::bke::greasepencil::Drawing::opacities_for_write(), blender::ed::sculpt_paint::InputSample::pressure, blender::bke::greasepencil::Drawing::radii_for_write(), self, blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_topology_changed(), BrushGpencilSettings::uv_random, and blender::bke::greasepencil::Drawing::vertex_colors_for_write().
Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin().
|
inline |
Definition at line 403 of file grease_pencil_paint.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, BKE_curvemapping_evaluateF(), color, BrushGpencilSettings::curve_rand_hue, BrushGpencilSettings::curve_rand_saturation, BrushGpencilSettings::curve_rand_value, BrushGpencilSettings::flag2, GP_BRUSH_USE_HUE_AT_STROKE, GP_BRUSH_USE_HUE_RAND_PRESS, GP_BRUSH_USE_SAT_AT_STROKE, GP_BRUSH_USE_SAT_RAND_PRESS, GP_BRUSH_USE_VAL_AT_STROKE, GP_BRUSH_USE_VAL_RAND_PRESS, hsv_to_rgb_v(), blender::math::interpolate(), BrushGpencilSettings::random_hue, BrushGpencilSettings::random_saturation, BrushGpencilSettings::random_value, rgb_to_hsv_v(), and self.
|
inline |
Definition at line 356 of file grease_pencil_paint.cc.
References BKE_curvemapping_evaluateF(), BrushGpencilSettings::curve_rand_strength, BrushGpencilSettings::draw_random_strength, BrushGpencilSettings::flag2, GP_BRUSH_USE_STRENGTH_AT_STROKE, GP_BRUSH_USE_STRENGTH_RAND_PRESS, blender::math::interpolate(), and self.
|
inline |
Definition at line 330 of file grease_pencil_paint.cc.
References BKE_curvemapping_evaluateF(), BrushGpencilSettings::curve_rand_pressure, BrushGpencilSettings::draw_random_press, BrushGpencilSettings::flag2, GP_BRUSH_USE_PRESS_AT_STROKE, GP_BRUSH_USE_PRESSURE_RAND_PRESS, blender::math::interpolate(), and self.
|
inline |
Definition at line 382 of file grease_pencil_paint.cc.
References BKE_curvemapping_evaluateF(), BrushGpencilSettings::curve_rand_uv, BrushGpencilSettings::flag2, GP_BRUSH_USE_UV_AT_STROKE, GP_BRUSH_USE_UV_RAND_PRESS, blender::math::interpolate(), self, and BrushGpencilSettings::uv_random.
| Brush* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::brush_ |
Definition at line 287 of file grease_pencil_paint.cc.
| bke::greasepencil::Drawing* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::drawing_ |
Definition at line 297 of file grease_pencil_paint.cc.
| 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.
| GreasePencil* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::grease_pencil_ |
Definition at line 285 of file grease_pencil_paint.cc.
| Scene* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::scene_ |
Definition at line 284 of file grease_pencil_paint.cc.
| BrushGpencilSettings* blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::settings_ |
Definition at line 289 of file grease_pencil_paint.cc.
| float blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::softness_ |
Definition at line 292 of file grease_pencil_paint.cc.
| bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_settings_random_ |
Definition at line 295 of file grease_pencil_paint.cc.
| bool blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::use_vertex_color_ |
Definition at line 294 of file grease_pencil_paint.cc.
| 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.