|
Blender V5.3
|
Inherits blender::ed::sculpt_paint::PaintStroke.
Public Member Functions | |
| ImagePaintStroke (bContext *C, wmOperator *op, const wmEvent *event) | |
| 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 |
Public Attributes | |
| PaintGradientData | gradient_data = {} |
| 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) |
Additional Inherited Members | |
| 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 108 of file paint_image_ops_paint.cc.
|
inline |
Definition at line 117 of file paint_image_ops_paint.cc.
References C, blender::ed::sculpt_paint::PaintStroke::PaintStroke(), and blender::Texture2D.
|
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 182 of file paint_image_ops_paint.cc.
References blender::BKE_brush_color_get(), blender::BKE_brush_secondary_color_get(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, blender::BRUSH_USE_GRADIENT, blender::copy_v3_v3(), blender::CTX_data_scene(), blender::ED_image_undo_push_end(), blender::ed::sculpt_paint::PaintStroke::evil_C, blender::Brush::flag, blender::ImagePaintSettings::flag, gradient_data, blender::Brush::image_brush_type, blender::IMAGE_PAINT_BRUSH_TYPE_FILL, blender::IMAGEPAINT_DRAWING, blender::ToolSettings::imapaint, blender::ed::sculpt_paint::PaintStroke::paint, blender::ImagePaintSettings::paint, blender::paint_2d_bucket_fill(), blender::paint_2d_gradient_fill(), blender::paint_2d_stroke_done(), blender::paint_brush_exit_tex(), blender::ed::sculpt_paint::PaintStroke::scene, blender::ed::sculpt_paint::image::ops::paint::PaintGradientData::start_mouse, blender::ed::sculpt_paint::PaintStroke::stroke_inverted(), and blender::Scene::toolsettings.
|
overridevirtual |
Callback function to retrieve the object space coordinates based on screen space coordinates.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 227 of file paint_image_ops_paint.cc.
|
overridevirtual |
Callback function for performing necessary redraw functions based on the stroke.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 177 of file paint_image_ops_paint.cc.
References blender::ed::sculpt_paint::PaintStroke::evil_C, and blender::paint_2d_redraw().
|
overridevirtual |
Callback function for dynamically determining if a stroke can be cancelled.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 233 of file paint_image_ops_paint.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 238 of file paint_image_ops_paint.cc.
References blender::BKE_curvemapping_init(), blender::BKE_paint_brush(), blender::BKE_view_layer_synced_ensure(), blender::BLI_assert(), blender::ed::sculpt_paint::PaintStroke::brush, blender::BRUSH_USE_GRADIENT, blender::copy_v2_v2(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::CTX_wm_region_view3d(), blender::Brush::curve_rand_hue, blender::Brush::curve_rand_saturation, blender::Brush::curve_rand_value, blender::ED_image_tools_paint_poll(), blender::ED_image_undo_push_begin(), blender::ed::sculpt_paint::PaintStroke::evil_C, blender::Brush::flag, blender::ImagePaintSettings::flag, gradient_data, blender::ed::sculpt_paint::image::ops::paint::gradient_draw_line(), blender::Brush::image_brush_type, blender::IMAGE_PAINT_BRUSH_TYPE_FILL, blender::IMAGEPAINT_DRAWING, blender::ToolSettings::imapaint, blender::wmOperatorType::name, blender::ImagePaintSettings::paint, blender::paint_2d_new_stroke(), blender::ed::sculpt_paint::image::ops::paint::PaintGradientData::prev_mouse, blender::wmOperator::ptr, RGN_TYPE_ANY, blender::RNA_enum_get(), blender::ed::sculpt_paint::PaintStroke::scene, SPACE_TYPE_ANY, blender::ed::sculpt_paint::image::ops::paint::PaintGradientData::start_mouse, blender::Texture2D, blender::Scene::toolsettings, blender::wmOperator::type, and blender::WM_paint_cursor_activate().
|
overridevirtual |
Callback function for performing a paint stroke for a new step.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 130 of file paint_image_ops_paint.cc.
References blender::BKE_brush_alpha_get(), blender::BKE_brush_alpha_set(), blender::BKE_brush_use_alpha_pressure(), blender::BKE_curvemapping_evaluateF(), blender::BKE_paint_brush(), blender::BKE_paint_get_active_from_context(), blender::ed::sculpt_paint::PaintStroke::brush, blender::BRUSH_ACCUMULATE, blender::BRUSH_STROKE_ANCHORED, blender::BRUSH_STROKE_DRAG_DOT, blender::copy_v2_v2(), blender::CTX_wm_manager(), blender::Brush::curve_strength, distance(), blender::ED_image_undo_restore(), ELEM, blender::ed::sculpt_paint::PaintStroke::evil_C, blender::Brush::flag, gradient_data, blender::Brush::image_brush_type, blender::IMAGE_PAINT_BRUSH_TYPE_FILL, blender::max_ff(), blender::ed::sculpt_paint::PaintStroke::StrokeStep::mouse, blender::bke::PaintRuntime::overlap_factor, blender::ed::sculpt_paint::PaintStroke::paint, blender::paint_2d_stroke(), blender::ed::sculpt_paint::PaintStroke::StrokeStep::pressure, blender::ed::sculpt_paint::image::ops::paint::PaintGradientData::prev_mouse, blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::Paint::runtime, blender::wmWindowManager::runtime, blender::ed::sculpt_paint::PaintStroke::StrokeStep::size, blender::UndoStack::step_init, blender::ed::sculpt_paint::PaintStroke::stroke_distance(), blender::Brush::stroke_method, and blender::bke::WindowManagerRuntime::undo_stack.
| PaintGradientData blender::ed::sculpt_paint::image::ops::paint::ImagePaintStroke::gradient_data = {} |
Definition at line 110 of file paint_image_ops_paint.cc.
Referenced by done(), test_start(), and update_step().