|
Blender V5.0
|
#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.
Classes | |
| struct | AutoMaskingInfo |
Public Types | |
| using | MutableDrawingInfo = blender::ed::greasepencil::MutableDrawingInfo |
| using | DrawingPlacement = ed::greasepencil::DrawingPlacement |
Public Attributes | |
| BrushStrokeMode | stroke_mode |
| float2 | start_mouse_position |
| float2 | prev_mouse_position |
| Array< AutoMaskingInfo > | auto_masking_info_per_drawing |
Definition at line 164 of file grease_pencil_intern.hh.
| using blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::DrawingPlacement = ed::greasepencil::DrawingPlacement |
Definition at line 167 of file grease_pencil_intern.hh.
| using blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::MutableDrawingInfo = blender::ed::greasepencil::MutableDrawingInfo |
Definition at line 166 of file grease_pencil_intern.hh.
|
default |
|
inline |
Definition at line 184 of file grease_pencil_intern.hh.
References stroke_mode.
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing | ( | const bContext & | C, |
| FunctionRef< bool(const GreasePencilStrokeParams ¶ms)> | fn ) const |
Used in vertex paint mode.
Definition at line 494 of file grease_pencil_paint_common.cc.
References C, 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, foreach_editable_drawing(), blender::ed::greasepencil::MutableDrawingInfo::frame_number, blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeParams::from_context(), blender::ed::sculpt_paint::greasepencil::get_drawings_for_stroke_operation(), i, 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().
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing | ( | const bContext & | C, |
| FunctionRef< bool(const GreasePencilStrokeParams ¶ms, const DeltaProjectionFunc &projection_fn)> | fn ) const |
Definition at line 531 of file grease_pencil_paint_common.cc.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), DEG_get_evaluated(), DEG_id_tag_update(), depsgraph, blender::ed::greasepencil::MutableDrawingInfo::drawing, foreach_editable_drawing(), blender::ed::greasepencil::MutableDrawingInfo::frame_number, blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeParams::from_context(), blender::ed::sculpt_paint::greasepencil::get_drawings_for_stroke_operation(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), i, 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 foreach_editable_drawing(), foreach_editable_drawing(), foreach_editable_drawing(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), 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().
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing | ( | const bContext & | C, |
| GrainSize | grain_size, | ||
| FunctionRef< bool(const GreasePencilStrokeParams ¶ms)> | fn ) const |
Definition at line 574 of file grease_pencil_paint_common.cc.
References C, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), depsgraph, foreach_editable_drawing(), blender::ed::sculpt_paint::greasepencil::get_drawings_for_stroke_operation(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::threading::parallel_for(), params, and blender::GrainSize::value.
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing_with_automask | ( | const bContext & | C, |
| FunctionRef< bool(const GreasePencilStrokeParams ¶ms, const IndexMask &points)> | fn ) const |
Referenced by 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(), and blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_extended().
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::foreach_editable_drawing_with_automask | ( | const bContext & | C, |
| FunctionRef< bool(const GreasePencilStrokeParams ¶ms, const IndexMask &points, const DeltaProjectionFunc &projection_fn)> | fn ) const |
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_auto_masking | ( | const bContext & | C, |
| const InputSample & | start_sample ) |
Definition at line 627 of file grease_pencil_paint_common.cc.
References blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), auto_masking_info_per_drawing, C, blender::ed::sculpt_paint::greasepencil::calculate_view_positions(), blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), blender::bke::Curve, blender::ed::sculpt_paint::greasepencil::curve_mask_for_stroke_operation(), depsgraph, blender::math::distance(), distance(), blender::ed::greasepencil::MutableDrawingInfo::drawing, GP_Sculpt_Settings::flag, blender::index_mask::IndexMask::foreach_index(), blender::ed::greasepencil::MutableDrawingInfo::frame_number, blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeParams::from_context(), blender::IndexMask::from_intersection(), blender::IndexMask::from_predicate(), blender::IndexMask::from_ranges(), blender::ed::sculpt_paint::greasepencil::get_drawings_with_masking_for_stroke_operation(), ToolSettings::gp_sculpt, GP_SCULPT_MASK_SELECTMODE_POINT, GP_SCULPT_MASK_SELECTMODE_SEGMENT, GP_SCULPT_MASK_SELECTMODE_STROKE, GP_SCULPT_SETT_FLAG_AUTOMASK_LAYER_STROKE, GP_SCULPT_SETT_FLAG_AUTOMASK_MATERIAL_ACTIVE, GP_SCULPT_SETT_FLAG_AUTOMASK_MATERIAL_STROKE, GP_SCULPT_SETT_FLAG_AUTOMASK_STROKE, ToolSettings::gpencil_selectmode_sculpt, if(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), init_auto_masking(), blender::index_mask::IndexMask::is_empty(), blender::ed::greasepencil::MutableDrawingInfo::layer_index, blender::bke::AttributeAccessor::lookup_or_default(), blender::math::max(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::AutoMaskingInfo::memory, blender::ed::sculpt_paint::InputSample::mouse_position, blender::ed::greasepencil::MutableDrawingInfo::multi_frame_falloff, blender::threading::parallel_for_each(), params, blender::bke::Point, blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::AutoMaskingInfo::point_mask, blender::ed::sculpt_paint::greasepencil::point_mask_for_stroke_operation(), blender::math::round(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::greasepencil::Drawing::strokes(), and Scene::toolsettings.
Referenced by init_auto_masking(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_begin(), and blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_begin().
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_stroke | ( | const bContext & | C, |
| const InputSample & | start_sample ) |
Definition at line 615 of file grease_pencil_paint_common.cc.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), C, blender::ed::sculpt_paint::greasepencil::init_brush(), init_stroke(), blender::ed::sculpt_paint::InputSample::mouse_position, prev_mouse_position, and start_mouse_position.
Referenced by init_stroke(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PinchOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::StrengthOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::ThicknessOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TwistOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::VertexReplaceOperation::on_stroke_begin(), and blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_begin().
| bool blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::is_inverted | ( | const Brush & | brush | ) | const |
Definition at line 398 of file grease_pencil_paint_common.cc.
References blender::ed::sculpt_paint::greasepencil::is_brush_inverted(), and stroke_mode.
Referenced by blender::ed::sculpt_paint::greasepencil::PinchOperation::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(), and blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended().
| float2 blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::mouse_delta | ( | const InputSample & | input_sample | ) | const |
Definition at line 403 of file grease_pencil_paint_common.cc.
References blender::ed::sculpt_paint::InputSample::mouse_position, and prev_mouse_position.
Referenced by blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::PushOperation::on_stroke_extended(), and blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended().
| void blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::stroke_extended | ( | const InputSample & | extension_sample | ) |
Definition at line 770 of file grease_pencil_paint_common.cc.
References blender::ed::sculpt_paint::InputSample::mouse_position, prev_mouse_position, and stroke_extended().
Referenced by blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_extended(), 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(), and stroke_extended().
| Array<AutoMaskingInfo> blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::auto_masking_info_per_drawing |
Definition at line 181 of file grease_pencil_intern.hh.
Referenced by init_auto_masking().
| float2 blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::prev_mouse_position |
Previous mouse position for computing the direction.
Definition at line 174 of file grease_pencil_intern.hh.
Referenced by init_stroke(), mouse_delta(), blender::ed::sculpt_paint::greasepencil::GrabOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_begin(), and stroke_extended().
| float2 blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::start_mouse_position |
Initial mouse sample position, used for placement origin.
Definition at line 172 of file grease_pencil_intern.hh.
Referenced by init_stroke(), and blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_begin().
| BrushStrokeMode blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::stroke_mode |
Definition at line 169 of file grease_pencil_intern.hh.
Referenced by GreasePencilStrokeOperationCommon(), is_inverted(), and blender::ed::sculpt_paint::greasepencil::SmoothOperation::SmoothOperation().