|
Blender V5.3
|
Inherits blender::ed::sculpt_paint::PaintStroke.
Public Member Functions | |
| SculptPaintStroke (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 | redraw (bool final) override |
| bool | test_cancel () override |
| void | update_step (wmOperator *op, const StrokeStep &stroke_step) 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 | |
| Main * | bmain_ |
| Sculpt * | sculpt_ |
| Base * | base_ |
| wmWindowManager * | wm_ |
| 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 |
|
inline |
Definition at line 4901 of file sculpt.cc.
References base_, bmain_, C, blender::CTX_data_active_base(), blender::CTX_data_main(), blender::CTX_data_tool_settings(), blender::CTX_wm_manager(), blender::ed::sculpt_paint::PaintStroke::PaintStroke(), blender::ToolSettings::sculpt, sculpt_, and wm_.
|
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 5724 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeToggleSettings::alt_mask, blender::ed::sculpt_paint::StrokeToggleSettings::alt_smooth, blender::BKE_paint_brush(), blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::brush_exit_tex(), blender::SculptSession::cache, blender::ed::sculpt_paint::Color, blender::ed::sculpt_paint::PaintStroke::depsgraph, done(), blender::ed::sculpt_paint::PaintStroke::evil_C, blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::Mask, blender::ed::sculpt_paint::mask_brush_toggle_off(), NC_OBJECT, ND_DRAW, blender::ed::sculpt_paint::PaintStroke::object, blender::Sculpt::paint, blender::ed::sculpt_paint::Position, blender::ed::sculpt_paint::undo::push_end(), blender::Object::runtime, sculpt_, blender::Brush::sculpt_brush_type, blender::SCULPT_BRUSH_TYPE_MASK, blender::SCULPT_BRUSH_TYPE_PAINT, blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::smooth_brush_toggle_off(), blender::ed::sculpt_paint::stroke_modifiers_check(), blender::ed::sculpt_paint::StrokeCache::toggle_settings, blender::ed::sculpt_paint::PaintStroke::vc, wm_, and blender::WM_event_add_notifier().
Referenced by done().
|
overridevirtual |
Callback function to retrieve the object space coordinates based on screen space coordinates.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 4920 of file sculpt.cc.
References blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::PaintStroke::depsgraph, get_location(), sculpt_, blender::ed::sculpt_paint::stroke_get_location_bvh(), and blender::ed::sculpt_paint::PaintStroke::vc.
Referenced by get_location().
|
overridevirtual |
Callback function for performing necessary redraw functions based on the stroke.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 5773 of file sculpt.cc.
References redraw().
Referenced by redraw().
|
overridevirtual |
Callback function for dynamically determining if a stroke can be cancelled.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 5775 of file sculpt.cc.
References blender::BKE_paint_brush_for_read(), blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::PaintStroke::paint, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), and test_cancel().
Referenced by test_cancel().
|
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 5519 of file sculpt.cc.
References base_, blender::BKE_curvemapping_init(), blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::brush_type_is_paint(), blender::View3DShading::color_type, 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::OB_SOLID, blender::ed::sculpt_paint::over_mesh(), blender::ed::sculpt_paint::PaintStroke::paint, blender::ed::sculpt_paint::undo::push_begin_ex(), blender::ed::sculpt_paint::PaintStroke::scene, sculpt_, blender::Brush::sculpt_brush_type, blender::ed::sculpt_paint::sculpt_brush_type_name(), blender::View3D::shading, blender::ed::sculpt_paint::stroke_cache_init(), test_start(), blender::View3DShading::type, blender::V3D_SHADING_VERTEX_COLOR, and blender::ed::sculpt_paint::PaintStroke::vc.
Referenced by test_start().
|
overridevirtual |
Callback function for performing a paint stroke for a new step.
Implements blender::ed::sculpt_paint::PaintStroke.
Definition at line 5671 of file sculpt.cc.
References blender::ed::sculpt_paint::StrokeCache::base_brush_strength, blender::ed::sculpt_paint::PaintStroke::brush, blender::ed::sculpt_paint::brush_strength(), blender::ed::sculpt_paint::brush_type_is_paint(), blender::SculptSession::cache, blender::ed::sculpt_paint::Color, blender::copy_v3_v3(), blender::ed::sculpt_paint::PaintStroke::depsgraph, blender::ed::sculpt_paint::do_brush_action(), blender::ed::sculpt_paint::do_symmetrical_brush_actions_with_tiling_and_feathering(), blender::ed::sculpt_paint::dynamic_topology_update(), blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::flush_update_step(), blender::ed::sculpt_paint::StrokeCache::last_location, blender::ed::sculpt_paint::StrokeCache::location, blender::ed::sculpt_paint::Mask, blender::ed::sculpt_paint::PaintStroke::object, blender::Sculpt::paint, blender::ed::sculpt_paint::Position, blender::ed::sculpt_paint::restore_from_undo_step_if_necessary(), blender::Object::runtime, blender::ed::sculpt_paint::PaintStroke::scene, sculpt_, blender::Brush::sculpt_brush_type, blender::SCULPT_BRUSH_TYPE_MASK, blender::ed::sculpt_paint::sculpt_fix_noise_tear(), blender::bke::ObjectRuntime::sculpt_session, blender::ed::sculpt_paint::stroke_cache_update(), blender::ed::sculpt_paint::PaintStroke::stroke_distance(), blender::ed::sculpt_paint::StrokeCache::stroke_distance, blender::ed::sculpt_paint::dyntopo::stroke_is_dyntopo(), blender::ed::sculpt_paint::stroke_modifiers_check(), update_step(), and blender::ed::sculpt_paint::PaintStroke::vc.
Referenced by update_step().
| Base* blender::ed::sculpt_paint::SculptPaintStroke::base_ |
Definition at line 4896 of file sculpt.cc.
Referenced by SculptPaintStroke(), and test_start().
| Main* blender::ed::sculpt_paint::SculptPaintStroke::bmain_ |
Definition at line 4894 of file sculpt.cc.
Referenced by SculptPaintStroke().
| Sculpt* blender::ed::sculpt_paint::SculptPaintStroke::sculpt_ |
Definition at line 4895 of file sculpt.cc.
Referenced by done(), get_location(), SculptPaintStroke(), test_start(), and update_step().
| wmWindowManager* blender::ed::sculpt_paint::SculptPaintStroke::wm_ |
Definition at line 4899 of file sculpt.cc.
Referenced by done(), and SculptPaintStroke().