Blender V5.3
blender::ed::sculpt_paint::greasepencil::PaintOperation Class Reference

Inherits blender::ed::sculpt_paint::GreasePencilStrokeOperation.

Public Member Functions

void on_stroke_begin (const bContext &C, const InputSample &start_sample) override
void on_stroke_extended (const bContext &C, const InputSample &extension_sample) override
void on_stroke_done (const bContext &C) override
 PaintOperation (const bool do_fill_guides=false)
bool update_stroke_depth_placement (const InputSample &sample)
IndexRange interpolate_stroke_depth (std::optional< int > start_point, float from_depth, float to_depth)
void toggle_fill_guides_brush_on (const bContext &C)
void toggle_fill_guides_brush_off (const bContext &C)
Public Member Functions inherited from blender::ed::sculpt_paint::PaintModeData
virtual ~PaintModeData ()=default

Friends

struct PaintOperationExecutor

Detailed Description

Definition at line 185 of file editors/sculpt_paint/grease_pencil/paint.cc.

Constructor & Destructor Documentation

◆ PaintOperation()

blender::ed::sculpt_paint::greasepencil::PaintOperation::PaintOperation ( const bool do_fill_guides = false)
inline

Definition at line 258 of file editors/sculpt_paint/grease_pencil/paint.cc.

Member Function Documentation

◆ interpolate_stroke_depth()

◆ on_stroke_begin()

void blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_begin ( const bContext & C,
const InputSample & start_sample )
overridevirtual

Implements blender::ed::sculpt_paint::GreasePencilStrokeOperation.

Definition at line 1181 of file editors/sculpt_paint/grease_pencil/paint.cc.

References blender::BKE_brush_init_gpencil_settings(), blender::BKE_curvemapping_init(), blender::BKE_grease_pencil_object_material_ensure_from_brush(), blender::BKE_object_material_index_get(), blender::BKE_paint_brush(), blender::BLI_assert(), blender::BLI_time_now_seconds(), C, blender::ed::greasepencil::calculate_texture_space(), blender::CTX_data_active_object(), blender::CTX_data_depsgraph_pointer(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_region(), blender::CTX_wm_view3d(), blender::BrushGpencilSettings::curve_jitter, blender::BrushGpencilSettings::curve_rand_pressure, blender::BrushGpencilSettings::curve_rand_strength, blender::BrushGpencilSettings::curve_rand_uv, blender::BrushGpencilSettings::curve_sensitivity, blender::BrushGpencilSettings::curve_strength, blender::DEG_get_evaluated(), blender::DEG_id_tag_update(), blender::BrushGpencilSettings::flag, blender::BrushGpencilSettings::flag2, blender::RandomNumberGenerator::from_random_seed(), blender::GP_BRUSH_GROUP_RANDOM, blender::GP_BRUSH_USE_FILL, blender::GP_BRUSH_USE_STROKE, blender::GP_LOCKAXIS_VIEW, blender::ID_RECALC_GEOMETRY, layer, blender::ed::sculpt_paint::InputSample::mouse_position, NC_GEOM, ND_DATA, PaintOperationExecutor, blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::ed::greasepencil::retrieve_editable_drawings(), toggle_fill_guides_brush_on(), and blender::WM_event_add_notifier().

Referenced by PaintOperationExecutor.

◆ on_stroke_done()

void blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done ( const bContext & C)
overridevirtual

Implements blender::ed::sculpt_paint::GreasePencilStrokeOperation.

Definition at line 1707 of file editors/sculpt_paint/grease_pencil/paint.cc.

References blender::ed::sculpt_paint::greasepencil::append_stroke_to_multiframe_drawings(), blender::bke::CurvesGeometry::attributes_for_write(), blender::BKE_brush_unprojected_radius_get(), blender::BKE_grease_pencil_object_material_alt_ensure_from_brush(), blender::BKE_object_material_index_get(), blender::BKE_paint_brush(), blender::BLI_assert(), C, blender::BrushGpencilSettings::conversion_threshold, blender::bke::MutableAttributeAccessor::convert_or_add_for_write_only_span(), blender::ed::sculpt_paint::greasepencil::convert_stroke_type(), blender::CTX_data_main(), blender::CTX_wm_region(), blender::CTX_wm_region_view3d(), blender::BrushGpencilSettings::curve_type, blender::CURVE_TYPE_POLY, blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::bke::CurvesGeometry::curves_range(), blender::DEG_id_tag_update(), blender::ed::sculpt_paint::greasepencil::deselect_stroke(), blender::BrushGpencilSettings::draw_smoothfac, blender::BrushGpencilSettings::draw_smoothlvl, blender::BrushGpencilSettings::draw_subdivide, blender::bke::SpanAttributeWriter< T >::finish(), blender::IndexRange::first(), blender::BrushGpencilSettings::flag, blender::BrushGpencilSettings::flag2, blender::IndexRange::from_single(), blender::GP_BRUSH_DISSABLE_LASSO, blender::GP_BRUSH_GROUP_SETTINGS, blender::GP_BRUSH_OUTLINE_STROKE, blender::GP_BRUSH_TRIM_STROKE, blender::GP_BRUSH_USE_FILL, blender::GP_TOOL_FLAG_AUTOMERGE_STROKE, blender::GP_TOOL_FLAG_CREATE_WEIGHTS, blender::GP_TOOL_FLAG_PAINT_ONBACK, blender::GP_USE_MULTI_FRAME_EDITING, blender::ID_RECALC_GEOMETRY, blender::IndexRange::last(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), NC_GEOM, ND_DATA, blender::BrushGpencilSettings::outline_fac, blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::ed::sculpt_paint::greasepencil::process_stroke_weights(), blender::bke::MutableAttributeAccessor::remove(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::BrushGpencilSettings::simplify_px, blender::ed::sculpt_paint::greasepencil::simplify_stroke(), blender::ed::sculpt_paint::greasepencil::smooth_stroke(), blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::ed::sculpt_paint::greasepencil::subdivide_stroke(), blender::bke::greasepencil::Drawing::tag_topology_changed(), blender::bke::greasepencil::Layer::to_world_space(), toggle_fill_guides_brush_off(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::ed::sculpt_paint::greasepencil::trim_stroke_ends(), blender::RegionView3D::viewmat, and blender::WM_event_add_notifier().

Referenced by PaintOperationExecutor.

◆ on_stroke_extended()

void blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_extended ( const bContext & C,
const InputSample & extension_sample )
overridevirtual

◆ toggle_fill_guides_brush_off()

void blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_off ( const bContext & C)

◆ toggle_fill_guides_brush_on()

void blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on ( const bContext & C)

◆ update_stroke_depth_placement()

◆ PaintOperationExecutor

friend struct PaintOperationExecutor
friend

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