|
Blender V5.3
|
Inherits blender::ed::sculpt_paint::PaintStroke.
Public Member Functions | |
| ExperimentalTexturePaintStroke (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 | |
| Base * | base_ |
| ImagePaintSettings * | settings_ |
| 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 469 of file paint_image_ops_paint.cc.
|
inline |
Definition at line 473 of file paint_image_ops_paint.cc.
References base_, blender::BKE_sculptsession_update_for_edit(), blender::ed::sculpt_paint::PaintStroke::brush, C, blender::SculptSession::cache, blender::CTX_data_active_base(), blender::CTX_data_active_object(), blender::CTX_data_ensure_evaluated_depsgraph(), blender::CTX_data_tool_settings(), blender::ed::sculpt_paint::PaintStroke::depsgraph, blender::ED_paint_brush_type_update_sticky_shading_color(), blender::ImagePaintSettings::flag, blender::G, blender::Brush::image_brush_type, blender::IMAGE_PAINT_BRUSH_TYPE_MASK, blender::IMAGEPAINT_PROJECT_LAYER_STENCIL_INV, blender::ToolSettings::imapaint, blender::Invert, blender::ed::sculpt_paint::StrokeToggleSettings::invert, blender::paint_brush_init_tex(), blender::ed::sculpt_paint::PaintStroke::PaintStroke(), blender::wmOperator::ptr, blender::RNA_boolean_get(), blender::RNA_enum_get(), blender::Object::runtime, blender::bke::ObjectRuntime::sculpt_session, settings_, blender::Texture3D, blender::ed::sculpt_paint::StrokeCache::toggle_settings, and blender::view3d_operator_needs_gpu().
|
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 722 of file paint_image_ops_paint.cc.
References blender::ed::sculpt_paint::PaintStroke::brush, blender::SculptSession::cache, blender::DEG_id_tag_update(), blender::ED_image_undo_push_end(), blender::ed::sculpt_paint::PaintStroke::evil_C, blender::ID_RECALC_SYNC_TO_EVAL, blender::Brush::image_brush_type, blender::ed::sculpt_paint::image::ops::paint::TexturePaintData::image_data, blender::IMAGE_PAINT_BRUSH_TYPE_MASK, blender::ed::sculpt_paint::image::ops::paint::TexturePaintData::mask_data, blender::ed::sculpt_paint::PaintStroke::mode_data_, NA_PAINTING, NC_IMAGE, NC_OBJECT, ND_DRAW, blender::ed::sculpt_paint::PaintStroke::object, blender::paint_brush_exit_tex(), blender::RegionView3D::rflag, blender::Object::runtime, blender::ViewContext::rv3d, blender::RV3D_PAINTING, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::PaintStroke::vc, and blender::WM_event_add_notifier().
|
overridevirtual |
Callback function to retrieve the object space coordinates based on screen space coordinates.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 523 of file paint_image_ops_paint.cc.
References blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::PaintStroke::depsgraph, blender::ed::sculpt_paint::PaintStroke::paint, blender::ed::sculpt_paint::stroke_get_location_bvh(), and blender::ed::sculpt_paint::PaintStroke::vc.
|
overridevirtual |
Callback function for performing necessary redraw functions based on the stroke.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 717 of file paint_image_ops_paint.cc.
|
overridevirtual |
Callback function for dynamically determining if a stroke can be cancelled.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 718 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 529 of file paint_image_ops_paint.cc.
References blender::ed::sculpt_paint::StrokeCache::accum, base_, blender::BKE_curvemapping_init(), blender::BLI_assert(), blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::brush_type_is_paint(), blender::SculptSession::cache, blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::Brush::curve_rand_hue, blender::Brush::curve_rand_saturation, blender::Brush::curve_rand_value, blender::ed::sculpt_paint::PaintStroke::depsgraph, blender::ED_image_undo_push_begin(), blender::IMAGE_PAINT_BRUSH_TYPE_MASK, blender::ed::sculpt_paint::image::ImageData::init_active_image(), blender::ed::sculpt_paint::image::ImageData::init_mask_image(), blender::ed::sculpt_paint::PaintStroke::mode_data_, blender::wmOperatorType::name, blender::ed::sculpt_paint::PaintStroke::paint, blender::Brush::sculpt_brush_type, settings_, blender::ed::sculpt_paint::stroke_cache_common_init(), blender::ed::sculpt_paint::stroke_get_location_bvh(), blender::Texture3D, blender::wmOperator::type, and blender::ed::sculpt_paint::PaintStroke::vc.
|
overridevirtual |
Callback function for performing a paint stroke for a new step.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 687 of file paint_image_ops_paint.cc.
References blender::ed::sculpt_paint::StrokeCache::base_brush_strength, blender::BKE_brush_use_alpha_pressure(), blender::BKE_curvemapping_evaluateF(), blender::ed::sculpt_paint::PaintStroke::brush, blender::SculptSession::cache, blender::Brush::curve_strength, blender::ed::sculpt_paint::PaintStroke::depsgraph, blender::ed::sculpt_paint::image::ops::paint::do_brush_action(), blender::ed::sculpt_paint::do_symmetrical_brush_actions_with_tiling_and_feathering(), blender::ED_region_tag_redraw(), blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::PaintStroke::mode_data_, blender::bke::PaintRuntime::overlap_factor, blender::ed::sculpt_paint::PaintStroke::paint, blender::ed::sculpt_paint::StrokeCache::pressure, blender::ViewContext::region, blender::RegionView3D::rflag, blender::Paint::runtime, blender::ViewContext::rv3d, blender::RV3D_PAINTING, blender::ed::sculpt_paint::PaintStroke::scene, step, blender::ed::sculpt_paint::image::ops::paint::stroke_cache_update(), blender::ed::sculpt_paint::PaintStroke::stroke_distance(), blender::ed::sculpt_paint::StrokeCache::stroke_distance, and blender::ed::sculpt_paint::PaintStroke::vc.
| Base* blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::base_ |
Definition at line 470 of file paint_image_ops_paint.cc.
Referenced by ExperimentalTexturePaintStroke(), and test_start().
| ImagePaintSettings* blender::ed::sculpt_paint::image::ops::paint::ExperimentalTexturePaintStroke::settings_ |
Definition at line 471 of file paint_image_ops_paint.cc.
Referenced by ExperimentalTexturePaintStroke(), and test_start().