|
Blender V4.5
|
Inherits blender::ed::sculpt_paint::GreasePencilStrokeOperation.
Public Member Functions | |
| void | on_stroke_begin (const bContext &C, const InputSample &start_sample) override |
| void | on_stroke_extended (const bContext &C, const InputSample &extension_sample) override |
| void | on_stroke_done (const bContext &C) override |
| PaintOperation (const bool do_fill_guides=false) | |
| bool | update_stroke_depth_placement (const bContext &C, const InputSample &sample) |
| IndexRange | interpolate_stroke_depth (const bContext &C, std::optional< int > start_point, float from_depth, float to_depth) |
| void | toggle_fill_guides_brush_on (const bContext &C) |
| void | toggle_fill_guides_brush_off (const bContext &C) |
Public Member Functions inherited from blender::ed::sculpt_paint::PaintModeData | |
| virtual | ~PaintModeData ()=default |
Friends | |
| struct | PaintOperationExecutor |
Definition at line 182 of file grease_pencil_paint.cc.
|
inline |
Definition at line 251 of file grease_pencil_paint.cc.
| IndexRange blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth | ( | const bContext & | C, |
| std::optional< int > | start_point, | ||
| float | from_depth, | ||
| float | to_depth ) |
Returns the range of actually reprojected points.
Definition at line 1076 of file grease_pencil_paint.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BLI_assert, CTX_data_scene(), blender::bke::CurvesGeometry::curves_range(), blender::IndexRange::first(), blender::IndexRange::from_begin_end_inclusive(), GP_TOOL_FLAG_PAINT_ONBACK, ToolSettings::gpencil_flags, blender::MutableSpan< T >::index_range(), blender::math::interpolate(), blender::IndexRange::is_empty(), blender::IndexRange::last(), blender::ed::greasepencil::DrawingPlacement::place(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions_for_write(), scene, blender::IndexRange::shift(), blender::IndexRange::size(), blender::MutableSpan< T >::slice(), blender::IndexRange::start(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and Scene::toolsettings.
Referenced by update_stroke_depth_placement().
|
overridevirtual |
Implements blender::ed::sculpt_paint::GreasePencilStrokeOperation.
Definition at line 1148 of file grease_pencil_paint.cc.
References BKE_brush_init_gpencil_settings(), BKE_curvemapping_init(), BKE_grease_pencil_object_material_ensure_from_brush(), BKE_object_material_index_get(), BKE_paint_brush(), BLI_assert, BLI_time_now_seconds(), blender::ed::greasepencil::DrawingPlacement::cache_viewport_depths(), blender::ed::greasepencil::calculate_texture_space(), RenderData::cfra, CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), BrushGpencilSettings::curve_jitter, Brush::curve_rand_hue, BrushGpencilSettings::curve_rand_pressure, Brush::curve_rand_saturation, BrushGpencilSettings::curve_rand_strength, BrushGpencilSettings::curve_rand_uv, Brush::curve_rand_value, BrushGpencilSettings::curve_sensitivity, BrushGpencilSettings::curve_strength, DEG_get_evaluated(), DEG_id_tag_update(), depsgraph, BrushGpencilSettings::flag, MaterialGPencilStyle::flag, blender::RandomNumberGenerator::from_random_seed(), blender::RandomNumberGenerator::get_float(), GP_BRUSH_GROUP_RANDOM, GP_LOCKAXIS_VIEW, GP_MATERIAL_FILL_SHOW, ToolSettings::gp_paint, ToolSettings::gp_sculpt, Material::gp_style, Brush::gpencil_settings, GreasePencil::id, ID_RECALC_GEOMETRY, GP_Sculpt_Settings::lock_axis, material, blender::ed::sculpt_paint::InputSample::mouse_position, NC_GEOM, ND_DATA, GpPaint::paint, blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), Scene::r, blender::ed::greasepencil::retrieve_editable_drawings(), GreasePencil::runtime, scene, blender::bke::greasepencil::Layer::to_object_space(), toggle_fill_guides_brush_on(), Scene::toolsettings, blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke(), blender::ed::greasepencil::DrawingPlacement::use_project_to_surface(), and WM_event_add_notifier().
|
overridevirtual |
Implements blender::ed::sculpt_paint::GreasePencilStrokeOperation.
Definition at line 1647 of file grease_pencil_paint.cc.
References blender::ed::sculpt_paint::greasepencil::append_stroke_to_multiframe_drawings(), blender::bke::CurvesGeometry::attributes_for_write(), BKE_grease_pencil_object_material_alt_ensure_from_brush(), BKE_object_material_index_get(), BKE_paint_brush(), BLI_assert, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), CTX_wm_region(), CTX_wm_region_view3d(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::bke::CurvesGeometry::curves_range(), DEG_id_tag_update(), blender::ed::sculpt_paint::greasepencil::deselect_stroke(), BrushGpencilSettings::draw_smoothfac, BrushGpencilSettings::draw_smoothlvl, blender::bke::SpanAttributeWriter< T >::finish(), blender::IndexRange::first(), BrushGpencilSettings::flag, blender::IndexRange::from_single(), GP_BRUSH_GROUP_SETTINGS, GP_BRUSH_OUTLINE_STROKE, GP_BRUSH_TRIM_STROKE, ToolSettings::gp_paint, GP_TOOL_FLAG_AUTOMERGE_STROKE, GP_TOOL_FLAG_CREATE_WEIGHTS, GP_TOOL_FLAG_PAINT_ONBACK, GP_USE_MULTI_FRAME_EDITING, ToolSettings::gpencil_flags, Brush::gpencil_settings, GreasePencil::id, ID_RECALC_GEOMETRY, blender::IndexRange::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), material, NC_GEOM, ND_DATA, BrushGpencilSettings::outline_fac, blender::ed::sculpt_paint::greasepencil::outline_stroke(), GpPaint::paint, blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::ed::sculpt_paint::greasepencil::process_stroke_weights(), blender::bke::MutableAttributeAccessor::remove(), GreasePencil::runtime, scene, blender::bke::greasepencil::Drawing::set_texture_matrices(), BrushGpencilSettings::simplify_px, blender::ed::sculpt_paint::greasepencil::simplify_stroke(), blender::ed::sculpt_paint::greasepencil::smooth_stroke(), blender::bke::SpanAttributeWriter< T >::span, blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_topology_changed(), blender::bke::greasepencil::Layer::to_world_space(), Scene::toolsettings, blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::ed::sculpt_paint::greasepencil::trim_stroke_ends(), Brush::unprojected_radius, RegionView3D::viewmat, and WM_event_add_notifier().
|
overridevirtual |
Implements blender::ed::sculpt_paint::GreasePencilStrokeOperation.
Definition at line 1234 of file grease_pencil_paint.cc.
References CTX_data_active_object(), DEG_id_tag_update(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::execute(), GreasePencil::id, ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, and WM_event_add_notifier().
| void blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_off | ( | const bContext & | C | ) |
Definition at line 1137 of file grease_pencil_paint.cc.
References BKE_id_free_ex(), BKE_paint_brush_set(), BKE_paint_get_active_from_context(), BLI_assert, and LIB_ID_FREE_NO_MAIN.
| void blender::ed::sculpt_paint::greasepencil::PaintOperation::toggle_fill_guides_brush_on | ( | const bContext & | C | ) |
Definition at line 1125 of file grease_pencil_paint.cc.
References BKE_paint_brush(), BKE_paint_brush_set(), BKE_paint_get_active_from_context(), BLI_assert, and blender::ed::sculpt_paint::greasepencil::create_fill_guide_brush().
Referenced by on_stroke_begin().
| bool blender::ed::sculpt_paint::greasepencil::PaintOperation::update_stroke_depth_placement | ( | const bContext & | C, |
| const InputSample & | sample ) |
Definition at line 1017 of file grease_pencil_paint.cc.
References blender::ed::sculpt_paint::greasepencil::AllPoints, BLI_assert, blender::ed::sculpt_paint::greasepencil::EndPoints, blender::ed::sculpt_paint::greasepencil::FirstPoint, blender::ed::greasepencil::DrawingPlacement::get_depth(), blender::ed::sculpt_paint::greasepencil::get_snap_mode(), interpolate_stroke_depth(), blender::IndexRange::is_empty(), blender::IndexRange::one_after_last(), sample, blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke(), and blender::ed::greasepencil::DrawingPlacement::use_project_to_surface().
|
friend |
Definition at line 241 of file grease_pencil_paint.cc.