|
Blender V5.3
|
Inherits blender::ed::sculpt_paint::PaintStroke.
Public Member Functions | |
| GreasePencilPaintStroke (bContext *C, wmOperator *op, const wmEvent *event, PaintMode mode) | |
Common Paint Operator Functions | |
| std::optional< float3 > | get_location (float2 mouse, bool force_original) override |
| bool | test_start (wmOperator *op, float2 mouse) override |
| void | update_step (wmOperator *op, const StrokeStep &stroke_step) override |
| void | redraw (bool final) override |
| bool | test_cancel () override |
| void | done (bool is_cancel, bool stroke_started) override |
| Public Member Functions inherited from blender::ed::sculpt_paint::PaintStroke | |
| PaintStroke ()=delete | |
| virtual | ~PaintStroke ()=default |
| wmOperatorStatus | modal (bContext *C, wmOperator *op, const wmEvent *event) |
| wmOperatorStatus | exec (bContext *C, wmOperator *op) |
| void | cancel (bContext *C) |
| void | finish (bContext *C) |
| bool | stroke_flipped () const |
| bool | stroke_inverted () const |
| float | stroke_distance () const |
| Public Member Functions inherited from blender::blender::NonCopyable | |
| NonCopyable (const NonCopyable &other)=delete | |
| NonCopyable & | operator= (const NonCopyable &other)=delete |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable &&other)=default | |
| NonCopyable & | operator= (NonCopyable &&other)=default |
| Public Member Functions inherited from blender::blender::NonMovable | |
| NonMovable (NonMovable &&other)=delete | |
| NonMovable & | operator= (NonMovable &&other)=delete |
| NonMovable ()=default | |
| NonMovable (const NonMovable &other)=default | |
| NonMovable & | operator= (const NonMovable &other)=default |
Additional Inherited Members | |
| Public Attributes inherited from blender::ed::sculpt_paint::PaintStroke | |
| bContext * | evil_C = nullptr |
| ViewContext | vc = {} |
| Depsgraph * | depsgraph = nullptr |
| Object * | object = nullptr |
| Scene * | scene = nullptr |
| Paint * | paint = nullptr |
| PaintMode | paint_mode = PaintMode::Invalid |
| Brush * | brush = nullptr |
| UnifiedPaintSettings * | ups = nullptr |
| float2 | last_mouse_position = float2(0.0f, 0.0f) |
| bool | constrain_line = false |
| float2 | constrained_pos = float2(0.0f, 0.0f) |
| Protected Member Functions inherited from blender::ed::sculpt_paint::PaintStroke | |
| PaintStroke (bContext *C, wmOperator *op, const wmEvent *event, PaintMode mode) | |
| Protected Attributes inherited from blender::ed::sculpt_paint::PaintStroke | |
| std::unique_ptr< PaintModeData > | mode_data_ = nullptr |
Definition at line 84 of file draw_ops.cc.
|
inline |
Definition at line 85 of file draw_ops.cc.
References C, and blender::ed::sculpt_paint::PaintStroke::PaintStroke().
|
overridevirtual |
Callback function for cleaning up and finalizing data after a stroke has finished.
| is_cancel | Some paint modes support cancelling a stroke and returning to the initial state. This parameter indicates this case so that appropriate cleanup actions can be taken. |
| stroke_started | Whether the stroke started. Subclasses can use this to determine if undo steps should be created. See \test_start. |
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 229 of file draw_ops.cc.
References blender::ed::sculpt_paint::PaintStroke::evil_C, blender::ed::sculpt_paint::PaintStroke::mode_data_, and blender::ed::sculpt_paint::GreasePencilStrokeOperation::on_stroke_done().
|
overridevirtual |
Callback function to retrieve the object space coordinates based on screen space coordinates.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 98 of file draw_ops.cc.
|
overridevirtual |
Callback function for performing necessary redraw functions based on the stroke.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 219 of file draw_ops.cc.
References blender::CTX_wm_region(), blender::ED_region_tag_redraw(), and blender::ed::sculpt_paint::PaintStroke::evil_C.
|
overridevirtual |
Callback function for dynamically determining if a stroke can be cancelled.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 224 of file draw_ops.cc.
|
overridevirtual |
Callback function to determine whether a stroke has started, and performing initialization.
In many cases, this is a check to whether the stroke is over the active mesh.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 193 of file draw_ops.cc.
|
overridevirtual |
Callback function for performing a paint stroke for a new step.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 198 of file draw_ops.cc.
References blender::BLI_assert(), blender::ed::sculpt_paint::PaintStroke::evil_C, blender::ed::sculpt_paint::get_stroke_operation(), blender::ed::sculpt_paint::PaintStroke::mode_data_, blender::ed::sculpt_paint::PaintStroke::StrokeStep::mouse, blender::ed::sculpt_paint::GreasePencilStrokeOperation::on_stroke_extended(), blender::ed::sculpt_paint::PaintStroke::StrokeStep::pressure, and sample.