Blender V4.3
blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon Class Reference

#include <grease_pencil_intern.hh>

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

Inherited by blender::ed::sculpt_paint::greasepencil::CloneOperation, blender::ed::sculpt_paint::greasepencil::GrabOperation, blender::ed::sculpt_paint::greasepencil::PinchOperation, blender::ed::sculpt_paint::greasepencil::PushOperation, blender::ed::sculpt_paint::greasepencil::RandomizeOperation, blender::ed::sculpt_paint::greasepencil::SmoothOperation, blender::ed::sculpt_paint::greasepencil::StrengthOperation, blender::ed::sculpt_paint::greasepencil::ThicknessOperation, blender::ed::sculpt_paint::greasepencil::TwistOperation, blender::ed::sculpt_paint::greasepencil::VertexAverageOperation, blender::ed::sculpt_paint::greasepencil::VertexBlurOperation, blender::ed::sculpt_paint::greasepencil::VertexPaintOperation, blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation, and blender::ed::sculpt_paint::greasepencil::VertexSmearOperation.

Public Types

using MutableDrawingInfo = blender::ed::greasepencil::MutableDrawingInfo
 
using DrawingPlacement = ed::greasepencil::DrawingPlacement
 

Public Member Functions

 GreasePencilStrokeOperationCommon ()
 
 GreasePencilStrokeOperationCommon (const BrushStrokeMode stroke_mode)
 
bool is_inverted (const Brush &brush) const
 
float2 mouse_delta (const InputSample &input_sample) const
 
void init_stroke (const bContext &C, const InputSample &start_sample)
 
void stroke_extended (const InputSample &extension_sample)
 
void foreach_editable_drawing (const bContext &C, FunctionRef< bool(const GreasePencilStrokeParams &params)> fn) const
 
void foreach_editable_drawing (const bContext &C, GrainSize grain_size, FunctionRef< bool(const GreasePencilStrokeParams &params)> fn) const
 
void foreach_editable_drawing (const bContext &C, FunctionRef< bool(const GreasePencilStrokeParams &params, const DeltaProjectionFunc &projection_fn)> fn) const
 
- Public Member Functions inherited from blender::ed::sculpt_paint::GreasePencilStrokeOperation
virtual void on_stroke_begin (const bContext &C, const InputSample &start_sample)=0
 
virtual void on_stroke_extended (const bContext &C, const InputSample &extension_sample)=0
 
virtual void on_stroke_done (const bContext &C)=0
 
- Public Member Functions inherited from blender::ed::sculpt_paint::PaintModeData
virtual ~PaintModeData ()=default
 

Public Attributes

BrushStrokeMode stroke_mode
 
float2 start_mouse_position
 
float2 prev_mouse_position
 

Detailed Description

Definition at line 154 of file grease_pencil_intern.hh.

Member Typedef Documentation

◆ DrawingPlacement

◆ MutableDrawingInfo

Constructor & Destructor Documentation

◆ GreasePencilStrokeOperationCommon() [1/2]

blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::GreasePencilStrokeOperationCommon ( )
inline

Definition at line 166 of file grease_pencil_intern.hh.

◆ GreasePencilStrokeOperationCommon() [2/2]

blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::GreasePencilStrokeOperationCommon ( const BrushStrokeMode stroke_mode)
inline

Definition at line 167 of file grease_pencil_intern.hh.

Member Function Documentation

◆ foreach_editable_drawing() [1/3]

void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing ( const bContext & C,
FunctionRef< bool(const GreasePencilStrokeParams &params)> fn ) const

Definition at line 392 of file grease_pencil_paint_common.cc.

References CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), DEG_id_tag_update(), depsgraph, blender::ed::greasepencil::MutableDrawingInfo::drawing, blender::ed::greasepencil::MutableDrawingInfo::frame_number, blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeParams::from_context(), blender::ed::sculpt_paint::greasepencil::get_drawings_for_painting(), GreasePencil::id, ID_RECALC_GEOMETRY, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::ed::greasepencil::MutableDrawingInfo::layer_index, blender::ed::greasepencil::MutableDrawingInfo::multi_frame_falloff, NC_GEOM, ND_DATA, params, and WM_event_add_notifier().

Referenced by blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation::on_stroke_extended(), and blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended().

◆ foreach_editable_drawing() [2/3]

◆ foreach_editable_drawing() [3/3]

◆ init_stroke()

◆ is_inverted()

◆ mouse_delta()

◆ stroke_extended()

Member Data Documentation

◆ prev_mouse_position

float2 blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::prev_mouse_position

Previous mouse position for computing the direction.

Definition at line 164 of file grease_pencil_intern.hh.

Referenced by mouse_delta().

◆ start_mouse_position

float2 blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::start_mouse_position

Initial mouse sample position, used for placement origin.

Definition at line 162 of file grease_pencil_intern.hh.

◆ stroke_mode

BrushStrokeMode blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::stroke_mode

Definition at line 159 of file grease_pencil_intern.hh.

Referenced by is_inverted().


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